feat: complete superadmin management endpoints

This commit is contained in:
2026-01-09 09:52:23 +08:00
parent 3e095c57f3
commit c0cebb6fb9
6 changed files with 877 additions and 33 deletions

View File

@@ -43,6 +43,24 @@ func (c *users) Get(ctx fiber.Ctx, id int64) (*dto.UserItem, error) {
return services.Super.GetUser(ctx, id)
}
// List user tenants
//
// @Router /super/v1/users/:id<int>/tenants [get]
// @Summary List user tenants
// @Description List tenants joined by user
// @Tags User
// @Accept json
// @Produce json
// @Param id path int64 true "User ID"
// @Param page query int false "Page number"
// @Param limit query int false "Page size"
// @Success 200 {object} requests.Pager{items=[]dto.UserTenantItem}
// @Bind id path
// @Bind filter query
func (c *users) ListTenants(ctx fiber.Ctx, id int64, filter *dto.SuperUserTenantListFilter) (*requests.Pager, error) {
return services.Super.ListUserTenants(ctx, id, filter)
}
// Update user status
//
// @Router /super/v1/users/:id<int>/status [patch]