aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/admin/handler.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-10 00:14:17 +0900
committernsfisis <nsfisis@gmail.com>2024-08-10 00:14:17 +0900
commitb450648caa0d1bd5c91e67a33153bbacaf57f006 (patch)
tree8dce01b8eb398759a3abdb97d3d333b52738c768 /backend/admin/handler.go
parenta7342525e5e4052113e6d5e75b6fd50c91687514 (diff)
downloadiosdc-japan-2024-albatross-b450648caa0d1bd5c91e67a33153bbacaf57f006.tar.gz
iosdc-japan-2024-albatross-b450648caa0d1bd5c91e67a33153bbacaf57f006.tar.zst
iosdc-japan-2024-albatross-b450648caa0d1bd5c91e67a33153bbacaf57f006.zip
feat: prepend base path
Diffstat (limited to 'backend/admin/handler.go')
-rw-r--r--backend/admin/handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/admin/handler.go b/backend/admin/handler.go
index b50b942..7239b08 100644
--- a/backend/admin/handler.go
+++ b/backend/admin/handler.go
@@ -37,11 +37,11 @@ func newAdminMiddleware() echo.MiddlewareFunc {
return func(c echo.Context) error {
jwt, err := c.Cookie("albatross_token")
if err != nil {
- return c.Redirect(http.StatusSeeOther, "/login")
+ return c.Redirect(http.StatusSeeOther, "/iosdc-japan/2024/code-battle/login")
}
claims, err := auth.ParseJWT(jwt.Value)
if err != nil {
- return c.Redirect(http.StatusSeeOther, "/login")
+ return c.Redirect(http.StatusSeeOther, "/iosdc-japan/2024/code-battle/login")
}
if !claims.IsAdmin {
return echo.NewHTTPError(http.StatusForbidden)