mirror of
https://github.com/warmbly/warmbly.git
synced 2026-08-22 16:01:29 +00:00
4b7a0be93d
Wire three GET endpoints behind the existing admin middleware so the admin app can browse workspaces alongside users: GET /admin/organizations list with q/cursor/limit/sort GET /admin/organizations/:id detail + plan/sub + limits + counts GET /admin/organizations/:id/members full member list with joined users The list query inlines member/email-account/campaign/active-campaign counts via subqueries so the table can render usage without an extra fetch per row. Detail layers GetOrganizationLimits + GetOrganizationCounts on top of the list shape, ensuring admin sees the same numbers the in-app limit checks enforce. Gated on AdminPermViewUsers for now since orgs are tightly coupled to user admin context today; a dedicated ViewOrganizations/ManageOrganizations pair will land alongside the write paths (per-org overrides, ban scope) in the next slice.