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:
parent
976f610158
commit
20b13d131b
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user