21 lines
407 B
Go
21 lines
407 B
Go
package handlers
|
|
|
|
import (
|
|
"fiber-sessions/app/handlers/usersession"
|
|
"fiber-sessions/app/templates"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func Home(ctx *fiber.Ctx) error {
|
|
requestSession := usersession.NewRequestSession(ctx)
|
|
|
|
pc := templates.PageContext{
|
|
Title: "Welcome to the demo",
|
|
ActivePage: "home",
|
|
RequestSession: requestSession,
|
|
}
|
|
Render(ctx, templates.Home(pc))
|
|
return nil
|
|
}
|