Adds the user administration route, associated server handlers, and frontend assets for managing user accounts.
21 lines
380 B
Go
21 lines
380 B
Go
package server
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func (app *App) handleAdminUsers(ctx *gin.Context) {
|
|
if !app.adminLoginEnabled() {
|
|
ctx.Redirect(http.StatusSeeOther, "/")
|
|
return
|
|
}
|
|
|
|
ctx.HTML(http.StatusOK, "admin/users.html", gin.H{
|
|
"AdminUsername": app.config.AdminUsername,
|
|
"AdminEmail": app.config.AdminEmail,
|
|
"ActivePage": "users",
|
|
})
|
|
}
|