Passport/pkg/server/admin/index.go

15 lines
308 B
Go
Raw Normal View History

2024-06-02 12:45:56 +00:00
package admin
import (
"git.solsynth.dev/hydrogen/passport/pkg/utils"
"github.com/gofiber/fiber/v2"
)
func MapAdminEndpoints(A *fiber.App, authFunc utils.AuthFunc) {
admin := A.Group("/api/admin").Use(authFunc)
{
admin.Post("/badges", grantBadge)
admin.Delete("/badges/:badgeId", revokeBadge)
}
}