clean: moved funcs to specific files + GetPage usecase/repo

This commit is contained in:
Florian Sylvain
2023-08-12 20:42:43 +02:00
parent 869fb3f145
commit 1539e06ec8
18 changed files with 190 additions and 136 deletions
+14
View File
@@ -0,0 +1,14 @@
package api
import (
"html/template"
"net/http"
)
func GetHomePage(w http.ResponseWriter, _ *http.Request) {
navbarTmpl, _ := Container.GetPageUseCase.GetPage("componentNavbar", nil)
homeTmpl, _ := Container.GetPageUseCase.GetPage("home", map[string]interface{}{
"Navbar": template.HTML(navbarTmpl),
})
_, _ = w.Write(homeTmpl)
}