refac: separated api content into sub-packages & renamed usecases

This commit is contained in:
Florian Sylvain
2025-03-13 19:43:12 +01:00
parent 7e29c08ea9
commit 4d6054e22b
38 changed files with 181 additions and 152 deletions
+18
View File
@@ -0,0 +1,18 @@
package pages
import (
"GoCMS/api"
"html/template"
"net/http"
"os"
)
func GetPageIntegration(w http.ResponseWriter, r *http.Request) {
navbarTmpl, _ := api.Container.GetPageUseCase.GetPage("componentNavbar", nil)
templ, _ := api.Container.GetPageUseCase.GetPage("integration", map[string]interface{}{
"Navbar": template.HTML(navbarTmpl),
"Head": headTmpl,
"Host": os.Getenv("HOST"),
})
_, _ = w.Write(templ)
}