Remove unnecessary try/catch

This commit is contained in:
Ivan Nieto Vivanco 2023-03-02 19:50:47 -06:00
parent e0b2dc043a
commit 95f568b934

View file

@ -459,11 +459,7 @@ class UsersController extends Controller
}
// The groups field has been passed but it is null, so we should blank it out
} elseif ($request->has('groups')) {
try{
$user->groups()->sync([]);
} catch (\Exception $exception){
return response()->json(Helper::formatStandardApiResponse('error', null, $exception));
}
}