aboutsummaryrefslogtreecommitdiff
path: root/routes/index.go
diff options
context:
space:
mode:
authorKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-11-07 00:32:39 -0300
committerFChannel <>2022-06-19 12:53:29 -0700
commit972223c992ca5aa5e5d93cff3b2ee4e30182025b (patch)
treeff61695c734852aeafdc0e872cc6f47085a8e787 /routes/index.go
parentbc9051fd1a17e793647cf309c973a7feefebd98f (diff)
restructuring part 5
Diffstat (limited to 'routes/index.go')
-rw-r--r--routes/index.go9
1 files changed, 4 insertions, 5 deletions
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")
}