Create admin only middleware

This commit is contained in:
Dominic Ferrando
2025-04-23 14:23:25 -04:00
parent cdef2c03be
commit a0f268b0d3
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ func main() {
// -----------------
// INDEX PAGE
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
r.With(util.AdminOnlyMiddleware).Get("/", func(w http.ResponseWriter, r *http.Request) {
views.Index().Render(r.Context(), w)
})