mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Merge pull request #629 from turbo124/master
return archived invoice as success
This commit is contained in:
commit
7b61c8a46d
@ -276,10 +276,15 @@ class InvoiceApiController extends BaseAPIController
|
|||||||
if ($request->action == ACTION_ARCHIVE) {
|
if ($request->action == ACTION_ARCHIVE) {
|
||||||
$invoice = Invoice::scope($publicId)->firstOrFail();
|
$invoice = Invoice::scope($publicId)->firstOrFail();
|
||||||
$this->invoiceRepo->archive($invoice);
|
$this->invoiceRepo->archive($invoice);
|
||||||
|
/*
|
||||||
$response = json_encode(RESULT_SUCCESS, JSON_PRETTY_PRINT);
|
$response = json_encode(RESULT_SUCCESS, JSON_PRETTY_PRINT);
|
||||||
$headers = Utils::getApiHeaders();
|
$headers = Utils::getApiHeaders();
|
||||||
return Response::make($response, 200, $headers);
|
return Response::make($response, 200, $headers);
|
||||||
|
*/
|
||||||
|
$transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer'));
|
||||||
|
$data = $this->createItem($invoice, $transformer, 'invoice');
|
||||||
|
|
||||||
|
return $this->response($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = $request->input();
|
$data = $request->input();
|
||||||
|
Loading…
Reference in New Issue
Block a user