aboutsummaryrefslogtreecommitdiff
path: root/processors/user.go
diff options
context:
space:
mode:
authorBobby <[email protected]>2025-07-16 13:18:20 +0530
committerBobby <[email protected]>2025-07-16 13:18:20 +0530
commitf13506cfba2da90764620dab2c624ac74767de62 (patch)
tree1651ed298d3f7c9dc7f6a5ccc03da7f0d133f5d6 /processors/user.go
parentf352d2678f91e4f4ea6902d084fb9590e2819e92 (diff)
downloadimageboard-f13506cfba2da90764620dab2c624ac74767de62.tar.xz
imageboard-f13506cfba2da90764620dab2c624ac74767de62.zip
constants and types refactor; next value for proper redirect on login
Diffstat (limited to 'processors/user.go')
-rw-r--r--processors/user.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/processors/user.go b/processors/user.go
index b875c89..e96f1f9 100644
--- a/processors/user.go
+++ b/processors/user.go
@@ -4,6 +4,7 @@ import (
"imageboard/database"
"imageboard/models"
"imageboard/session"
+ "imageboard/utils/auth"
"github.com/gofiber/fiber/v2"
)
@@ -38,6 +39,7 @@ func UserContextProcessor(ctx *fiber.Ctx) error {
ctx.Locals("User", user)
ctx.Locals("IsAuthenticated", user != nil)
+ ctx.Locals("LogoutURL", auth.GetLogoutURLWithRedirect(ctx))
return ctx.Next()
}