mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +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:
commit
205bc72675
@ -25,7 +25,7 @@ class ClientObserver
|
||||
*/
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_CLIENT, $client);
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_CLIENT, $client, $client->company);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,7 +25,7 @@ class ExpenseObserver
|
||||
*/
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_EXPENSE, $expense);
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_EXPENSE, $expense, $expense->company);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@ class InvoiceObserver
|
||||
*/
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_INVOICE, $invoice);
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_INVOICE, $invoice, $invoice->company);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@ class PaymentObserver
|
||||
*/
|
||||
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)
|
||||
{
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_PAYMENT, $payment);
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_PAYMENT, $payment, $payment->company);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,7 +25,7 @@ class QuoteObserver
|
||||
*/
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_QUOTE, $quote);
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_QUOTE, $quote, $quote->company);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,7 +25,7 @@ class TaskObserver
|
||||
*/
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_TASK, $task);
|
||||
WebhookHandler::dispatch(Webhook::EVENT_DELETE_TASK, $task, $task->company);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user