You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
374 B
Go
19 lines
374 B
Go
package http
|
|
|
|
import (
|
|
"github.com/gofiber/fiber/v3"
|
|
)
|
|
|
|
// RegisterRoutes wires HTTP routes.
|
|
func RegisterRoutes(app *fiber.App, h *Handler, auth fiber.Handler) {
|
|
// Auth middleware if configured
|
|
if auth != nil {
|
|
app.Use(auth)
|
|
}
|
|
|
|
admin := app.Group("/admin")
|
|
admin.Post("/auth", h.AdminAuth)
|
|
admin.Get("/dashboard", h.Dashboard)
|
|
admin.Get("/audit", h.AuditList)
|
|
}
|