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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user