Remove quick fix

This commit is contained in:
Bubka 2025-02-19 11:10:24 +01:00
parent 78e337021e
commit 37afe2057f
3 changed files with 0 additions and 27 deletions

View File

@ -1,12 +0,0 @@
<?php
namespace App\Exceptions;
use Exception;
/**
* Class ConflictException.
*
* @codeCoverageIgnore
*/
class ConflictException extends Exception {}

View File

@ -106,14 +106,5 @@ class Handler extends ExceptionHandler
], 401);
}
});
$this->renderable(function (ConflictException $exception, $request) {
return response()->json([
'message' => 'conflict',
'reason' => [$exception->getMessage()],
], 409);
});
}
}

View File

@ -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
{
@ -67,10 +65,6 @@ class GroupService
throw new AuthorizationException;
}
if (! $group) {
throw new ConflictException(__('errors.resource_not_found'));
}
// Proceed with assignment
$group->twofaccounts()->saveMany($twofaccounts);
$group->loadCount('twofaccounts');