diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-10 00:14:17 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-10 00:14:17 +0900 |
| commit | b450648caa0d1bd5c91e67a33153bbacaf57f006 (patch) | |
| tree | 8dce01b8eb398759a3abdb97d3d333b52738c768 /backend/admin/handler.go | |
| parent | a7342525e5e4052113e6d5e75b6fd50c91687514 (diff) | |
| download | iosdc-japan-2025-albatross-b450648caa0d1bd5c91e67a33153bbacaf57f006.tar.gz iosdc-japan-2025-albatross-b450648caa0d1bd5c91e67a33153bbacaf57f006.tar.zst iosdc-japan-2025-albatross-b450648caa0d1bd5c91e67a33153bbacaf57f006.zip | |
feat: prepend base path
Diffstat (limited to 'backend/admin/handler.go')
| -rw-r--r-- | backend/admin/handler.go | 4 |
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) |
