Remove fiber ctx

This commit is contained in:
Eden Kirin
2024-02-06 19:31:37 +01:00
parent 8bafff716c
commit f6c4b3eb06
7 changed files with 35 additions and 40 deletions

View File

@ -1,20 +1,15 @@
package handlers
import (
"fiber-sessions/app/data"
"fiber-sessions/app/router/requests"
"fiber-sessions/app/templates"
"github.com/gofiber/fiber/v2"
)
func Home(ctx *fiber.Ctx) error {
request := requests.NewRequest(ctx, data.UsersStorage)
func Home(request *requests.Request) error {
pc := templates.PageContext{
Title: "Welcome to the demo",
ActivePage: "home",
}
Render(ctx, templates.Home(request, pc))
Render(request.Ctx, templates.Home(request, pc))
return nil
}