1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Apply fixes from StyleCI

This commit is contained in:
Dan Brown
2021-06-26 15:23:15 +00:00
committed by StyleCI Bot
parent 3a402f6adc
commit 934a833818
349 changed files with 3655 additions and 2625 deletions

View File

@ -29,6 +29,7 @@ class ApiAuthenticate
/**
* Ensure the current user can access authenticated API routes, either via existing session
* authentication or via API Token authentication.
*
* @throws UnauthorizedException
*/
protected function ensureAuthorizedBySessionOrToken(): void
@ -40,6 +41,7 @@ class ApiAuthenticate
if (!user()->can('access-api')) {
throw new ApiAuthException(trans('errors.api_user_no_api_permission'), 403);
}
return;
}
@ -58,9 +60,9 @@ class ApiAuthenticate
{
return response()->json([
'error' => [
'code' => $code,
'code' => $code,
'message' => $message,
]
],
], $code);
}
}