From f4c2f9262e3fe0f47c86d0d2fb2b4034c7d60c3c Mon Sep 17 00:00:00 2001 From: Yanislav Igonin Date: Thu, 3 Feb 2022 15:12:34 +0200 Subject: [PATCH] fix: access to thread id in post template --- repositories/structs.go | 2 +- templates/components/post.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repositories/structs.go b/repositories/structs.go index 164d677..c00c149 100644 --- a/repositories/structs.go +++ b/repositories/structs.go @@ -19,7 +19,7 @@ type Post struct { UpdatedAt time.Time `json:"-"` } -func (p *Post) getThreadID() int { +func (p Post) GetThreadID() int { if p.IsParent { return p.ID } diff --git a/templates/components/post.html b/templates/components/post.html index 41b8781..48ba82c 100644 --- a/templates/components/post.html +++ b/templates/components/post.html @@ -5,8 +5,8 @@
{{ range $File := .Files }} {{ end }}