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,11 +211,9 @@ class InvoiceApiController extends BaseAPIController
|
||||
$invoice = $recurringInvoice;
|
||||
}
|
||||
$reminder = isset($data['email_type']) ? $data['email_type'] : false;
|
||||
if (auth()->user()->isTrusted()) {
|
||||
$this->dispatch(new SendInvoiceEmail($invoice, auth()->user()->id, $reminder));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$invoice = Invoice::scope($invoice->public_id)
|
||||
->with('client', 'invoice_items', 'invitations')
|
||||
@ -344,10 +342,6 @@ class InvoiceApiController extends BaseAPIController
|
||||
|
||||
public function emailInvoice(InvoiceRequest $request)
|
||||
{
|
||||
if (! auth()->user()->isTrusted()) {
|
||||
return $this->errorResponse('Requires paid pro plan', 400);
|
||||
}
|
||||
|
||||
$invoice = $request->entity();
|
||||
|
||||
if ($invoice->is_recurring && $recurringInvoice = $this->invoiceRepo->createRecurringInvoice($invoice)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user