1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +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) public function destroy(DestroyExpenseRequest $request, Expense $expense)
{ {
//may not need these destroy routes as we are using actions to 'archive/delete' $this->expense_repo->delete($expense);
$expense->delete();
return response()->json([], 200); return $this->itemResponse($expense->fresh());
} }
/** /**

View File

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