bug fixes, half-finished admin ui, and a more
This commit is contained in:
@@ -41,6 +41,10 @@ func AuthCheckMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
return c.Redirect(http.StatusFound, "/login")
|
||||
}
|
||||
|
||||
if strings.Contains(path, "/admin") && !authenticated {
|
||||
return c.Redirect(http.StatusFound, "/login")
|
||||
}
|
||||
|
||||
return next(c)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user