Add ability to delete posts

This commit is contained in:
Dominic Ferrando
2025-04-23 17:10:59 -04:00
parent 62a1377be0
commit c5453ed50a
5 changed files with 123 additions and 21 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ templ ThreadsCatalog(previews []CatalogThreadPreview, catalogContext CatalogCont
<h1>{ elThreadId }</h1>
<button
class="link-button"
hx-delete={ fmt.Sprintf("/admin/%s/threads/%d", catalogContext.BoardSlug, preview.ThreadId) }
hx-delete={ fmt.Sprintf("/admin/threads/%d", preview.ThreadId) }
hx-swap="none"
_="on htmx:afterRequest trigger refreshPosts on body"
hx-confirm="Are you sure you wish to delete this thread?"