mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Restore Invoice from API
This commit is contained in:
parent
165a382637
commit
cae3b48cd4
@ -317,8 +317,8 @@ class InvoiceApiController extends BaseAPIController
|
||||
return $this->response($data);
|
||||
}
|
||||
else if ($request->action == ACTION_RESTORE) {
|
||||
$invoice = Invoice::scope($publicId)->firstOrFail();
|
||||
$invoice = $this->invoiceRepo->restore($invoice);
|
||||
$invoice = Invoice::scope($publicId)->withTrashed()->firstOrFail();
|
||||
$this->invoiceRepo->restore($invoice);
|
||||
|
||||
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
||||
$data = $this->createItem($invoice, $transformer, 'invoice');
|
||||
|
Loading…
Reference in New Issue
Block a user