diff --git a/CHANGELOG.md b/CHANGELOG.md index 55865df..3ba6390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ v1.6 v1.5 --- +- Fix FLEXIAPI-202 Add account parameter to the redirection in the destroy admin route - Fix FLEXIAPI-195 Fix LiblinphoneTesterAccoutSeeder to fit with the latest Account related changes - Fix FLEXIAPI-193 Typo - Fix FLEXIAPI-192 Clear and upgrade properly the account dictionary entries if the entries are already existing diff --git a/flexiapi/app/Http/Controllers/Admin/AccountDeviceController.php b/flexiapi/app/Http/Controllers/Admin/AccountDeviceController.php index 2b96e13..2952c3f 100644 --- a/flexiapi/app/Http/Controllers/Admin/AccountDeviceController.php +++ b/flexiapi/app/Http/Controllers/Admin/AccountDeviceController.php @@ -58,8 +58,10 @@ class AccountDeviceController extends Controller public function destroy(Request $request, int $accountId) { $connector = new FlexisipConnector; - $connector->deleteDevice(Account::findOrFail($accountId)->identifier, $request->get('uuid')); + $account = Account::findOrFail($accountId); - return redirect()->route('admin.account.device.index'); + $connector->deleteDevice($account->identifier, $request->get('uuid')); + + return redirect()->route('admin.account.device.index', $account); } }