feat: post list and edition redirect

This commit is contained in:
Florian Sylvain
2024-05-17 16:38:41 +02:00
parent 24eefb743b
commit 900ad3e8b8
2062 changed files with 7238 additions and 24 deletions
+2
View File
@@ -6,10 +6,12 @@ import (
)
func GetPostsPage(w http.ResponseWriter, _ *http.Request) {
posts := Container.ListPostsUseCase.ListPosts()
navbarTmpl, _ := Container.GetPageUseCase.GetPage("componentNavbar", nil)
postsTmpl, _ := Container.GetPageUseCase.GetPage("posts", map[string]interface{}{
"Navbar": template.HTML(navbarTmpl),
"Head": headTmpl,
"Posts": posts,
})
_, _ = w.Write(postsTmpl)
}