diff --git a/app/Exceptions/ConflictException.php b/app/Exceptions/ConflictException.php deleted file mode 100644 index 1d92dabb..00000000 --- a/app/Exceptions/ConflictException.php +++ /dev/null @@ -1,12 +0,0 @@ -renderable(function (ConflictException $exception, $request) { - return response()->json([ - 'message' => 'conflict', - 'reason' => [$exception->getMessage()], - ], 409); - }); - - } } diff --git a/app/Services/GroupService.php b/app/Services/GroupService.php index 62c12fd1..6de1444c 100644 --- a/app/Services/GroupService.php +++ b/app/Services/GroupService.php @@ -2,7 +2,6 @@ namespace App\Services; -use App\Exceptions\ConflictException; use App\Models\Group; use App\Models\TwoFAccount; use App\Models\User; @@ -21,7 +20,6 @@ class GroupService * @param mixed $targetGroup The group the accounts should be assigned to * * @throws \Illuminate\Auth\Access\AuthorizationException - * @throws App\Exceptions\ConflictException */ public static function assign($ids, User $user, mixed $targetGroup = null) : void { @@ -66,10 +64,6 @@ class GroupService if ($user->cannot('updateEach', [(new TwoFAccount), $twofaccounts])) { throw new AuthorizationException; } - - if (! $group) { - throw new ConflictException(__('errors.resource_not_found')); - } // Proceed with assignment $group->twofaccounts()->saveMany($twofaccounts);