feat(packages): implement package-based business model
This commit is contained in:
@@ -22,9 +22,9 @@ class CreditCheckMiddleware
|
||||
]);
|
||||
}
|
||||
|
||||
if ($this->requiresCredits($request) && $tenant->event_credits_balance < 1) {
|
||||
if ($this->requiresCredits($request) && !$tenant->canCreateEvent()) {
|
||||
return response()->json([
|
||||
'error' => 'Insufficient event credits. Please purchase more credits.',
|
||||
'error' => 'No available package for creating events. Please purchase a package.',
|
||||
], 402);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user