removed all references to credits. now credits are completely replaced by addons.
This commit is contained in:
@@ -180,12 +180,10 @@ class EventController extends Controller
|
||||
'gallery_expires_at' => $package->gallery_days ? now()->addDays($package->gallery_days) : null,
|
||||
]);
|
||||
|
||||
if ($package->isReseller()) {
|
||||
$note = sprintf('Event #%d created (%s)', $event->id, $event->name);
|
||||
$note = sprintf('Event #%d created (%s)', $event->id, $event->name);
|
||||
|
||||
if (! $tenant->consumeEventAllowance(1, 'event.create', $note)) {
|
||||
throw new HttpException(402, 'Insufficient credits or package allowance.');
|
||||
}
|
||||
if (! $tenant->consumeEventAllowance(1, 'event.create', $note)) {
|
||||
throw new HttpException(402, 'Insufficient package allowance.');
|
||||
}
|
||||
|
||||
return $event;
|
||||
@@ -220,7 +218,7 @@ class EventController extends Controller
|
||||
'eventType',
|
||||
'photos' => fn ($query) => $query->with('likes')->latest(),
|
||||
'tasks',
|
||||
'tenant' => fn ($query) => $query->select('id', 'name', 'event_credits_balance'),
|
||||
'tenant' => fn ($query) => $query->select('id', 'name'),
|
||||
'eventPackages' => fn ($query) => $query
|
||||
->with(['package', 'addons'])
|
||||
->orderByDesc('purchased_at')
|
||||
|
||||
Reference in New Issue
Block a user