mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-13 06:47:46 -08:00
Remove unnecessary try/catch
This commit is contained in:
parent
e0b2dc043a
commit
95f568b934
|
@ -459,11 +459,7 @@ class UsersController extends Controller
|
||||||
}
|
}
|
||||||
// The groups field has been passed but it is null, so we should blank it out
|
// The groups field has been passed but it is null, so we should blank it out
|
||||||
} elseif ($request->has('groups')) {
|
} elseif ($request->has('groups')) {
|
||||||
try{
|
$user->groups()->sync([]);
|
||||||
$user->groups()->sync([]);
|
|
||||||
} catch (\Exception $exception){
|
|
||||||
return response()->json(Helper::formatStandardApiResponse('error', null, $exception));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue