From 80246a232ef98e446b829486585f5361b8c3881b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Jaussoin?= Date: Wed, 23 Jul 2025 16:53:11 +0200 Subject: [PATCH] Fix FLEXIAPI-364 Fix a faulty redirection in the ExternalAccount controller --- CHANGELOG.md | 1 + .../Http/Controllers/Admin/ExternalAccountController.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bab20e8..2b8d7fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,7 @@ v2.0 - Fix FLEXIAPI-362 Return an empty object and not an empty array in the vcards-storage index endpoint to prevent some parsing issues in the clients - Fix FLEXIAPI-312 Add Redis publish event when updating the externalAccount to ping the Flexisip B2BUA - Fix FLEXIAPI-363 Send the Redis publish event when the externalAccount is deleted to ping the Flexisip B2BUA +- Fix FLEXIAPI-364 Fix a faulty redirection in the ExternalAccount controller v1.6 ---- diff --git a/flexiapi/app/Http/Controllers/Admin/ExternalAccountController.php b/flexiapi/app/Http/Controllers/Admin/ExternalAccountController.php index a539b6f..cee9c86 100644 --- a/flexiapi/app/Http/Controllers/Admin/ExternalAccountController.php +++ b/flexiapi/app/Http/Controllers/Admin/ExternalAccountController.php @@ -43,9 +43,9 @@ class ExternalAccountController extends Controller public function store(CreateUpdate $request, int $accountId) { - $externalAccount = (new AccountService)->storeExternalAccount($request, $accountId); + (new AccountService)->storeExternalAccount($request, $accountId); - return redirect()->route('admin.account.show', $externalAccount->account->id); + return redirect()->route('admin.account.show', $accountId); } public function delete(int $accountId) @@ -59,6 +59,6 @@ class ExternalAccountController extends Controller { (new AccountService)->deleteExternalAccount($accountId); - return redirect()->route('admin.account.show', $account->id); + return redirect()->route('admin.account.show', $accountId); } }