feat: expand superadmin user detail views

This commit is contained in:
2026-01-15 12:29:52 +08:00
parent 8419ddede7
commit bec984b959
10 changed files with 2874 additions and 12 deletions

View File

@@ -226,6 +226,23 @@ func (r *Routes) Register(router fiber.Router) {
r.users.Get,
PathParam[int64]("id"),
))
r.log.Debugf("Registering route: Get /super/v1/users/:id<int>/coupons -> users.ListCoupons")
router.Get("/super/v1/users/:id<int>/coupons"[len(r.Path()):], DataFunc2(
r.users.ListCoupons,
PathParam[int64]("id"),
Query[dto.SuperUserCouponListFilter]("filter"),
))
r.log.Debugf("Registering route: Get /super/v1/users/:id<int>/notifications -> users.ListNotifications")
router.Get("/super/v1/users/:id<int>/notifications"[len(r.Path()):], DataFunc2(
r.users.ListNotifications,
PathParam[int64]("id"),
Query[dto.SuperUserNotificationListFilter]("filter"),
))
r.log.Debugf("Registering route: Get /super/v1/users/:id<int>/realname -> users.RealName")
router.Get("/super/v1/users/:id<int>/realname"[len(r.Path()):], DataFunc1(
r.users.RealName,
PathParam[int64]("id"),
))
r.log.Debugf("Registering route: Get /super/v1/users/:id<int>/tenants -> users.ListTenants")
router.Get("/super/v1/users/:id<int>/tenants"[len(r.Path()):], DataFunc2(
r.users.ListTenants,