feat(internal-admin): brand reassignment #31
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase F. POST /internal/admin/subscriptions/:id/brands replaces the userBrands set, validates count against plan.
POST /internal/admin/subscriptions/:id/brands { brandIds[], reason, founderId } - Only operates on active or trial subscriptions. - Refuses Full plan (brandCount=0) — that tier auto-grants all brands. - brandIds.length must exactly match plan.brandCount, no duplicates. - Each brand ID must exist and be active. - Replaces the user_brands rows for the subscription atomically (delete + insert; same-row contention is microseconds, panel calls are serial per founder). - Logs the old → new brand sets for auditability. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>