From 972223c992ca5aa5e5d93cff3b2ee4e30182025b Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Sun, 7 Nov 2021 00:32:39 -0300 Subject: restructuring part 5 --- routes/index.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'routes/index.go') diff --git a/routes/index.go b/routes/index.go index a130796..3599455 100644 --- a/routes/index.go +++ b/routes/index.go @@ -7,7 +7,7 @@ import ( "github.com/gofiber/fiber/v2" ) -func Index(c *fiber.Ctx) error { +func Index(ctx *fiber.Ctx) error { actor, err := db.GetActorFromDB(config.Domain) if err != nil { return err @@ -20,7 +20,7 @@ func Index(c *fiber.Ctx) error { data.Board.Name = "" data.Key = config.Key data.Board.Domain = config.Domain - data.Board.ModCred, _ = getPassword(c) + data.Board.ModCred, _ = getPassword(ctx) data.Board.Actor = actor data.Board.Post.Actor = actor.Id data.Board.Restricted = actor.Restricted @@ -46,10 +46,9 @@ func Index(c *fiber.Ctx) error { } data.Themes = &config.Themes + data.ThemeCookie = getThemeCookie(ctx) - data.ThemeCookie = getThemeCookie(c) - - return c.Render("index", fiber.Map{ + return ctx.Render("index", fiber.Map{ "page": data, }, "layouts/main") } -- cgit v1.2.3