mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Check archived invoices aren't emailed through the API
This commit is contained in:
parent
b7cd7c9bff
commit
2f838416b0
@ -309,10 +309,15 @@ class InvoiceApiController extends BaseAPIController
|
||||
{
|
||||
$invoice = $request->entity();
|
||||
|
||||
$this->dispatch(new SendInvoiceEmail($invoice));
|
||||
//$this->dispatch(new SendInvoiceEmail($invoice));
|
||||
$result = app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice);
|
||||
|
||||
if ($result !== true) {
|
||||
return $this->errorResponse($result, 500);
|
||||
}
|
||||
|
||||
$response = json_encode(RESULT_SUCCESS, JSON_PRETTY_PRINT);
|
||||
$headers = Utils::getApiHeaders();
|
||||
$response = json_encode(RESULT_SUCCESS, JSON_PRETTY_PRINT);
|
||||
|
||||
return Response::make($response, 200, $headers);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user