feat: Add free/exempt subscription status for organizations

- Add 'free' subscription status (exempt from fees)
- POST /admin/organizations/:id/set-free - Set org as free
- POST /admin/organizations/:id/remove-free - Remove free status
- Free orgs get enterprise plan, no expiry
This commit is contained in:
2026-03-13 06:01:29 +00:00
parent 40adeb15ee
commit 4fda22ecf0
2 changed files with 48 additions and 0 deletions

View File

@@ -38,6 +38,11 @@ export async function subscriptionMiddleware(ctx: Context, next: Next): Promise<
let message = "";
switch (org.subscription_status) {
case "free":
// Exempt from fees - always active
isActive = true;
break;
case "active":
// Check if subscription has ended
if (org.subscription_ends_at && new Date(org.subscription_ends_at) < now) {