1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 06:32:40 +01:00

Merge pull request #4316 from beganovich/v5-fix-issue-with-webhook-handler

(v5) Fix issue with WebhookHandler company passing
This commit is contained in:
Benjamin Beganović 2020-11-17 13:25:41 +01:00 committed by GitHub
commit 205bc72675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 17 deletions

View File

@ -25,7 +25,7 @@ class ClientObserver
*/ */
public function created(Client $client) public function created(Client $client)
{ {
WebhookHandler::dispatch(Webhook::EVENT_CREATE_CLIENT, $client); WebhookHandler::dispatch(Webhook::EVENT_CREATE_CLIENT, $client, $client->company);
} }
/** /**
@ -36,7 +36,7 @@ class ClientObserver
*/ */
public function updated(Client $client) public function updated(Client $client)
{ {
WebhookHandler::dispatch(Webhook::EVENT_UPDATE_CLIENT, $client); WebhookHandler::dispatch(Webhook::EVENT_UPDATE_CLIENT, $client, $client->company);
} }
/** /**
@ -47,7 +47,7 @@ class ClientObserver
*/ */
public function deleted(Client $client) public function deleted(Client $client)
{ {
WebhookHandler::dispatch(Webhook::EVENT_DELETE_CLIENT, $client); WebhookHandler::dispatch(Webhook::EVENT_DELETE_CLIENT, $client, $client->company);
} }
/** /**

View File

@ -25,7 +25,7 @@ class ExpenseObserver
*/ */
public function created(Expense $expense) public function created(Expense $expense)
{ {
WebhookHandler::dispatch(Webhook::EVENT_CREATE_EXPENSE, $expense); WebhookHandler::dispatch(Webhook::EVENT_CREATE_EXPENSE, $expense, $expense->company);
} }
/** /**
@ -36,7 +36,7 @@ class ExpenseObserver
*/ */
public function updated(Expense $expense) public function updated(Expense $expense)
{ {
WebhookHandler::dispatch(Webhook::EVENT_UPDATE_EXPENSE, $expense); WebhookHandler::dispatch(Webhook::EVENT_UPDATE_EXPENSE, $expense, $expense->company);
} }
/** /**
@ -47,7 +47,7 @@ class ExpenseObserver
*/ */
public function deleted(Expense $expense) public function deleted(Expense $expense)
{ {
WebhookHandler::dispatch(Webhook::EVENT_DELETE_EXPENSE, $expense); WebhookHandler::dispatch(Webhook::EVENT_DELETE_EXPENSE, $expense, $expense->company);
} }
/** /**

View File

@ -26,7 +26,7 @@ class InvoiceObserver
*/ */
public function created(Invoice $invoice) public function created(Invoice $invoice)
{ {
WebhookHandler::dispatch(Webhook::EVENT_CREATE_INVOICE, $invoice); WebhookHandler::dispatch(Webhook::EVENT_CREATE_INVOICE, $invoice, $invoice->expense);
} }
/** /**
@ -37,7 +37,7 @@ class InvoiceObserver
*/ */
public function updated(Invoice $invoice) public function updated(Invoice $invoice)
{ {
WebhookHandler::dispatch(Webhook::EVENT_UPDATE_INVOICE, $invoice); WebhookHandler::dispatch(Webhook::EVENT_UPDATE_INVOICE, $invoice, $invoice->company);
} }
/** /**
@ -48,7 +48,7 @@ class InvoiceObserver
*/ */
public function deleted(Invoice $invoice) public function deleted(Invoice $invoice)
{ {
WebhookHandler::dispatch(Webhook::EVENT_DELETE_INVOICE, $invoice); WebhookHandler::dispatch(Webhook::EVENT_DELETE_INVOICE, $invoice, $invoice->company);
} }
/** /**

View File

@ -26,7 +26,7 @@ class PaymentObserver
*/ */
public function created(Payment $payment) public function created(Payment $payment)
{ {
WebhookHandler::dispatch(Webhook::EVENT_CREATE_PAYMENT, $payment); WebhookHandler::dispatch(Webhook::EVENT_CREATE_PAYMENT, $payment, $payment->company);
} }
/** /**
@ -47,7 +47,7 @@ class PaymentObserver
*/ */
public function deleted(Payment $payment) public function deleted(Payment $payment)
{ {
WebhookHandler::dispatch(Webhook::EVENT_DELETE_PAYMENT, $payment); WebhookHandler::dispatch(Webhook::EVENT_DELETE_PAYMENT, $payment, $payment->company);
} }
/** /**

View File

@ -25,7 +25,7 @@ class QuoteObserver
*/ */
public function created(Quote $quote) public function created(Quote $quote)
{ {
WebhookHandler::dispatch(Webhook::EVENT_CREATE_QUOTE, $quote); WebhookHandler::dispatch(Webhook::EVENT_CREATE_QUOTE, $quote, $quote->company);
} }
/** /**
@ -36,7 +36,7 @@ class QuoteObserver
*/ */
public function updated(Quote $quote) public function updated(Quote $quote)
{ {
WebhookHandler::dispatch(Webhook::EVENT_UPDATE_QUOTE, $quote); WebhookHandler::dispatch(Webhook::EVENT_UPDATE_QUOTE, $quote, $quote->company);
} }
/** /**
@ -47,7 +47,7 @@ class QuoteObserver
*/ */
public function deleted(Quote $quote) public function deleted(Quote $quote)
{ {
WebhookHandler::dispatch(Webhook::EVENT_DELETE_QUOTE, $quote); WebhookHandler::dispatch(Webhook::EVENT_DELETE_QUOTE, $quote, $quote->company);
} }
/** /**

View File

@ -25,7 +25,7 @@ class TaskObserver
*/ */
public function created(Task $task) public function created(Task $task)
{ {
WebhookHandler::dispatch(Webhook::EVENT_CREATE_TASK, $task); WebhookHandler::dispatch(Webhook::EVENT_CREATE_TASK, $task, $task->company);
} }
/** /**
@ -36,7 +36,7 @@ class TaskObserver
*/ */
public function updated(Task $task) public function updated(Task $task)
{ {
WebhookHandler::dispatch(Webhook::EVENT_UPDATE_TASK, $task); WebhookHandler::dispatch(Webhook::EVENT_UPDATE_TASK, $task, $task->company);
} }
/** /**
@ -47,7 +47,7 @@ class TaskObserver
*/ */
public function deleted(Task $task) public function deleted(Task $task)
{ {
WebhookHandler::dispatch(Webhook::EVENT_DELETE_TASK, $task); WebhookHandler::dispatch(Webhook::EVENT_DELETE_TASK, $task, $task->company);
} }
/** /**