2024-06-02 20:45:56 +08:00
|
|
|
package admin
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
|
|
)
|
|
|
|
|
2024-07-16 18:09:18 +08:00
|
|
|
func MapAdminAPIs(app *fiber.App, baseURL string) {
|
|
|
|
admin := app.Group(baseURL)
|
2024-06-02 20:45:56 +08:00
|
|
|
{
|
|
|
|
admin.Post("/badges", grantBadge)
|
|
|
|
admin.Delete("/badges/:badgeId", revokeBadge)
|
2024-06-30 11:32:01 +08:00
|
|
|
|
|
|
|
admin.Post("/notify/all", notifyAllUser)
|
2024-07-03 23:07:59 +08:00
|
|
|
admin.Post("/notify/:user", notifyOneUser)
|
2024-07-03 22:57:17 +08:00
|
|
|
|
2024-07-03 23:33:22 +08:00
|
|
|
admin.Get("/users", listUser)
|
|
|
|
admin.Get("/users/:user", getUser)
|
|
|
|
admin.Get("/users/:user/factors", getUserAuthFactors)
|
2024-07-03 22:57:17 +08:00
|
|
|
admin.Put("/users/:user/permissions", editUserPermission)
|
2024-07-03 23:01:20 +08:00
|
|
|
admin.Post("/users/:user/confirm", forceConfirmAccount)
|
2024-06-02 20:45:56 +08:00
|
|
|
}
|
|
|
|
}
|