1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Return expense response when using delete route

This commit is contained in:
David Bomba 2021-01-14 07:33:45 +11:00
parent 976f610158
commit 20b13d131b
2 changed files with 5 additions and 3 deletions

View File

@ -426,10 +426,9 @@ class ExpenseController extends BaseController
*/
public function destroy(DestroyExpenseRequest $request, Expense $expense)
{
//may not need these destroy routes as we are using actions to 'archive/delete'
$expense->delete();
$this->expense_repo->delete($expense);
return response()->json([], 200);
return $this->itemResponse($expense->fresh());
}
/**

View File

@ -66,6 +66,9 @@ class UploadFile implements ShouldQueue
*/
public function handle() : ?Document
{
if(!$this->file)
return null;
$path = self::PROPERTIES[$this->type]['path'];
if ($this->company) {