package server import "github.com/gin-gonic/gin" func (app *App) registerAdminRoutes(router *gin.Engine) { admin := router.Group("/admin") admin.Use(noStoreAdminHeaders) admin.GET("/login", app.handleAdminLogin) admin.POST("/login", app.handleAdminLoginPost) protected := admin.Group("") protected.Use(app.requireAdminSession) protected.POST("/logout", app.handleAdminLogout) protected.GET("", app.handleAdminDashboard) protected.GET("/", app.handleAdminDashboard) protected.GET("/boxes", app.handleAdminBoxes) protected.GET("/users", app.handleAdminUsers) protected.POST("/users", app.handleAdminUsersPost) protected.GET("/tags", app.handleAdminTags) protected.POST("/tags", app.handleAdminTagsPost) protected.GET("/settings", app.handleAdminSettings) protected.POST("/settings", app.handleAdminSettingsPost) }