fix for interactions

This commit is contained in:
Niko Abeler 2024-02-24 20:11:09 +01:00
parent 0bf7c492c9
commit 8200e3384c
2 changed files with 9 additions and 13 deletions

View File

@ -12,20 +12,16 @@
<thead>
<tr>
<th scope="col">Entry</th>
<th scope="col">Interaction</th>
<th scope="col">Created At</th>
</tr>
</thead>
{{ range .Interactions }}
<tr>
<td scope="row">
{{ .Interactions.EntryID }}
<a href="/posts/{{ .EntryID }}">{{ .EntryID }}</a>
</td>
<td>
{{ .Interactions.Content }}
</td>
<td>
{{ .Interactions.CreatedAt }}
{{ .CreatedAt.Format "2006-01-02 15:04:05" }}
</td>
</tr>
{{ end }}

View File

@ -32,7 +32,7 @@ func (h *AdminInteractionHandler) HandleGet(c *fiber.Ctx) error {
c.Set(fiber.HeaderContentType, fiber.MIMETextHTML)
return render.RenderTemplateWithBase(c, siteConfig, "views/interaction_manager", fiber.Map{
"Binaries": pageData.items,
"Interactions": pageData.items,
"Page": pageData.page,
"NextPage": pageData.page + 1,
"PrevPage": pageData.page - 1,