router: fix /accounts route in normal usage

mistake from previous commits, the route wasn't being assigned at all.
This commit is contained in:
Harvey Tindall
2025-05-28 12:38:36 +01:00
parent 3c87b78dd9
commit 4f02c44e39

View File

@@ -139,7 +139,7 @@ func (app *appContext) loadRoutes(router *gin.Engine) {
}
// Handle the obvious collision of /accounts
if p != "" || PAGES.Admin != "" {
if len(routePrefixes) == 1 || p != "" || PAGES.Admin != "" {
router.GET(p+PAGES.Admin+"/accounts", app.AdminPage)
}
router.GET(p+PAGES.Admin+"/settings", app.AdminPage)