mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:54:30 -04: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);
|
return $this->response($data);
|
||||||
}
|
}
|
||||||
else if ($request->action == ACTION_RESTORE) {
|
else if ($request->action == ACTION_RESTORE) {
|
||||||
$invoice = Invoice::scope($publicId)->firstOrFail();
|
$invoice = Invoice::scope($publicId)->withTrashed()->firstOrFail();
|
||||||
$invoice = $this->invoiceRepo->restore($invoice);
|
$this->invoiceRepo->restore($invoice);
|
||||||
|
|
||||||
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
||||||
$data = $this->createItem($invoice, $transformer, 'invoice');
|
$data = $this->createItem($invoice, $transformer, 'invoice');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user