feat: expand superadmin edits and minio docs

This commit is contained in:
2026-01-17 19:32:46 +08:00
parent 3af5b20bcc
commit 984a404b5f
25 changed files with 2688 additions and 36 deletions

View File

@@ -228,6 +228,18 @@ func (r *Routes) Register(router fiber.Router) {
r.creators.List,
Query[dto.TenantListFilter]("filter"),
))
r.log.Debugf("Registering route: Get /super/v1/creators/:tenantID<int>/settings -> creators.GetSettings")
router.Get("/super/v1/creators/:tenantID<int>/settings"[len(r.Path()):], DataFunc1(
r.creators.GetSettings,
PathParam[int64]("tenantID"),
))
r.log.Debugf("Registering route: Put /super/v1/creators/:tenantID<int>/settings -> creators.UpdateSettings")
router.Put("/super/v1/creators/:tenantID<int>/settings"[len(r.Path()):], Func3(
r.creators.UpdateSettings,
Local[*models.User]("__ctx_user"),
PathParam[int64]("tenantID"),
Body[v1_dto.Settings]("form"),
))
// Register routes for controller: finance
r.log.Debugf("Registering route: Get /super/v1/finance/anomalies/balances -> finance.ListBalanceAnomalies")
router.Get("/super/v1/finance/anomalies/balances"[len(r.Path()):], DataFunc1(
@@ -261,6 +273,13 @@ func (r *Routes) Register(router fiber.Router) {
r.notifications.ListTemplates,
Query[dto.SuperNotificationTemplateListFilter]("filter"),
))
r.log.Debugf("Registering route: Patch /super/v1/notifications/templates/:id<int> -> notifications.UpdateTemplate")
router.Patch("/super/v1/notifications/templates/:id<int>"[len(r.Path()):], DataFunc3(
r.notifications.UpdateTemplate,
Local[*models.User]("__ctx_user"),
PathParam[int64]("id"),
Body[dto.SuperNotificationTemplateUpdateForm]("form"),
))
r.log.Debugf("Registering route: Post /super/v1/notifications/broadcast -> notifications.Broadcast")
router.Post("/super/v1/notifications/broadcast"[len(r.Path()):], Func1(
r.notifications.Broadcast,
@@ -318,6 +337,20 @@ func (r *Routes) Register(router fiber.Router) {
r.payoutAccounts.List,
Query[dto.SuperPayoutAccountListFilter]("filter"),
))
r.log.Debugf("Registering route: Patch /super/v1/payout-accounts/:id<int> -> payoutAccounts.Update")
router.Patch("/super/v1/payout-accounts/:id<int>"[len(r.Path()):], Func3(
r.payoutAccounts.Update,
Local[*models.User]("__ctx_user"),
PathParam[int64]("id"),
Body[dto.SuperPayoutAccountUpdateForm]("form"),
))
r.log.Debugf("Registering route: Post /super/v1/creators/:tenantID<int>/payout-accounts -> payoutAccounts.Create")
router.Post("/super/v1/creators/:tenantID<int>/payout-accounts"[len(r.Path()):], Func3(
r.payoutAccounts.Create,
Local[*models.User]("__ctx_user"),
PathParam[int64]("tenantID"),
Body[dto.SuperPayoutAccountCreateForm]("form"),
))
r.log.Debugf("Registering route: Post /super/v1/payout-accounts/:id<int>/review -> payoutAccounts.Review")
router.Post("/super/v1/payout-accounts/:id<int>/review"[len(r.Path()):], Func3(
r.payoutAccounts.Review,
@@ -487,6 +520,13 @@ func (r *Routes) Register(router fiber.Router) {
router.Get("/super/v1/users/statuses"[len(r.Path()):], DataFunc0(
r.users.Statuses,
))
r.log.Debugf("Registering route: Patch /super/v1/users/:id<int> -> users.UpdateProfile")
router.Patch("/super/v1/users/:id<int>"[len(r.Path()):], Func3(
r.users.UpdateProfile,
Local[*models.User]("__ctx_user"),
PathParam[int64]("id"),
Body[dto.SuperUserProfileUpdateForm]("form"),
))
r.log.Debugf("Registering route: Patch /super/v1/users/:id<int>/roles -> users.UpdateRoles")
router.Patch("/super/v1/users/:id<int>/roles"[len(r.Path()):], Func2(
r.users.UpdateRoles,