mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Remove isTrusted check from emailing w/API
This commit is contained in:
parent
6a0e6e8a73
commit
2330f07b4c
@ -211,9 +211,7 @@ class InvoiceApiController extends BaseAPIController
|
|||||||
$invoice = $recurringInvoice;
|
$invoice = $recurringInvoice;
|
||||||
}
|
}
|
||||||
$reminder = isset($data['email_type']) ? $data['email_type'] : false;
|
$reminder = isset($data['email_type']) ? $data['email_type'] : false;
|
||||||
if (auth()->user()->isTrusted()) {
|
$this->dispatch(new SendInvoiceEmail($invoice, auth()->user()->id, $reminder));
|
||||||
$this->dispatch(new SendInvoiceEmail($invoice, auth()->user()->id, $reminder));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,10 +342,6 @@ class InvoiceApiController extends BaseAPIController
|
|||||||
|
|
||||||
public function emailInvoice(InvoiceRequest $request)
|
public function emailInvoice(InvoiceRequest $request)
|
||||||
{
|
{
|
||||||
if (! auth()->user()->isTrusted()) {
|
|
||||||
return $this->errorResponse('Requires paid pro plan', 400);
|
|
||||||
}
|
|
||||||
|
|
||||||
$invoice = $request->entity();
|
$invoice = $request->entity();
|
||||||
|
|
||||||
if ($invoice->is_recurring && $recurringInvoice = $this->invoiceRepo->createRecurringInvoice($invoice)) {
|
if ($invoice->is_recurring && $recurringInvoice = $this->invoiceRepo->createRecurringInvoice($invoice)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user