mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 02:54:36 -04:00
Handle different cases
This commit is contained in:
parent
95727d6ec2
commit
bb361f78dd
@ -174,7 +174,23 @@ class BaseRepository
|
|||||||
->exists();
|
->exists();
|
||||||
|
|
||||||
if ($subscriptions) {
|
if ($subscriptions) {
|
||||||
WebhookHandler::dispatch($webhookEvent, $entity, $entity->company, 'client')->delay(now()->addSeconds(2));
|
switch(true){
|
||||||
|
case $webhookEvent == Webhook::EVENT_RESTORE_PAYMENT:
|
||||||
|
case $webhookEvent == Webhook::EVENT_ARCHIVE_PAYMENT:
|
||||||
|
WebhookHandler::dispatch($webhookEvent, $entity, $entity->company, 'invoices,client')->delay(now()->addSeconds(2));
|
||||||
|
break;
|
||||||
|
case $webhookEvent == Webhook::EVENT_RESTORE_EXPENSE:
|
||||||
|
case $webhookEvent == Webhook::EVENT_ARCHIVE_EXPENSE:
|
||||||
|
case $webhookEvent == Webhook::EVENT_ARCHIVE_CREDIT:
|
||||||
|
case $webhookEvent == Webhook::EVENT_RESTORE_CREDIT:
|
||||||
|
case $webhookEvent == Webhook::EVENT_RESTORE_CLIENT:
|
||||||
|
case $webhookEvent == Webhook::EVENT_ARCHIVE_CLIENT:
|
||||||
|
WebhookHandler::dispatch($webhookEvent, $entity, $entity->company)->delay(now()->addSeconds(2));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
WebhookHandler::dispatch($webhookEvent, $entity, $entity->company, 'client')->delay(now()->addSeconds(2));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user