Files
sase.tr/apps
Semih Yesilyurt b7a5b6996b
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
feat(internal-admin): brand reassignment — Phase F
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>
2026-05-18 10:35:43 +03:00
..