+ to the git

This commit is contained in:
itsig0
2024-03-20 22:56:17 +01:00
commit cc4bd9febc
86 changed files with 11153 additions and 0 deletions

15
handler/util.go Normal file
View File

@@ -0,0 +1,15 @@
package handler
import (
"github.com/a-h/templ"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/session"
)
var store = session.New()
func render(c *fiber.Ctx, component templ.Component) error {
// or templ wil bork...
c.Set("Content-type", "text/html")
return component.Render(c.Context(), c.Response().BodyWriter())
}