mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 21:02:12 +03:00
Add GET/POST /api/quota/groups and PATCH/DELETE /api/quota/groups/[id]. PATCH rename calls renameGroup then re-syncs quotaShared-* combos (via dynamic-import syncQuotaCombos) for every pool in the group, since combo names embed the group slug. DELETE maps the deleteGroup throw (protected group-demo or pools still referencing the group) to 409 Conflict via buildErrorBody — never 500. All handlers are management-gated via requireManagementAuth and route all errors through buildErrorBody (Hard Rule #12). 37-assertion source-scan test verifies auth, error sanitisation, response shapes, Zod validation, PATCH re-sync wiring, and DELETE 409 logic.