Fix Pint formatting
This commit is contained in:
@@ -15,7 +15,7 @@ class ApiDocsAuth
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
$user = Auth::user();
|
||||
if (!$user) {
|
||||
if (! $user) {
|
||||
$authHeader = (string) $request->header('Authorization');
|
||||
if ($authHeader !== '' && stripos($authHeader, 'Bearer ') === 0) {
|
||||
$token = trim(substr($authHeader, 7));
|
||||
@@ -34,11 +34,11 @@ class ApiDocsAuth
|
||||
}
|
||||
}
|
||||
|
||||
if (!$user) {
|
||||
if (! $user) {
|
||||
return $this->deny('Unauthorized access to documentation.', 401);
|
||||
}
|
||||
|
||||
if (!$this->userIsAdmin((int) $user->id)) {
|
||||
if (! $this->userIsAdmin((int) $user->id)) {
|
||||
return $this->deny('Admin privileges required.', 403);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user