Refer to steam method

This commit is contained in:
James Cole
2021-10-03 06:05:47 +02:00
parent 5d71baa4a1
commit 4e7a27dd65
3 changed files with 8 additions and 34 deletions

View File

@@ -84,7 +84,7 @@ class DeleteController extends Controller
}
$objectType = strtolower($journal->transaction_type_type ?? $journal->transactionType->type);
$subTitle = (string)trans('firefly.delete_' . $objectType, ['description' => $group->title ?? $journal->description]);
$previous = URL::previous(route('index'));
$previous = app('steam')->getSafePreviousUrl(route('index'));
// put previous url in session
Log::debug('Will try to remember previous URI');
$this->rememberPreviousUri('transactions.delete.uri');

View File

@@ -161,6 +161,6 @@ class LinkController extends Controller
{
$this->repository->switchLink($link);
return redirect(URL::previous());
return redirect(app('steam')->getSafePreviousUrl());
}
}