diff --git a/app/Http/Controllers/TwoFAccountController.php b/app/Http/Controllers/TwoFAccountController.php index 9d1fc5f1..5215a062 100644 --- a/app/Http/Controllers/TwoFAccountController.php +++ b/app/Http/Controllers/TwoFAccountController.php @@ -132,7 +132,7 @@ class TwoFAccountController extends Controller { $validated = $request->validated(); - TwoFAccount::setNewOrder($validated['orderedIds']); + $this->twofaccountService->saveOrder($validated['orderedIds']); return response()->json(['message' => 'order saved'], 200); } diff --git a/app/Services/TwoFAccountService.php b/app/Services/TwoFAccountService.php index f3450df1..516803bb 100644 --- a/app/Services/TwoFAccountService.php +++ b/app/Services/TwoFAccountService.php @@ -179,6 +179,14 @@ class TwoFAccountService } + /** + * Save TwoFAccounts order + */ + public function saveOrder(array $ids) + { + TwoFAccount::setNewOrder($ids); + } + // ######################################################################################################################## // ########################################################################################################################