mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
run lint
This commit is contained in:
parent
3e22e36a79
commit
7320711a36
23 changed files with 36 additions and 81 deletions
|
|
@ -68,11 +68,11 @@ Flight::route('/auth/handle/@token', [$authController, 'handle']);
|
|||
Flight::route('/auth/login/@token', [$authController, 'login']);
|
||||
Flight::route('/auth/logout/@token', [$authController, 'logout']);
|
||||
|
||||
Flight::map('error', function(\Exception $ex){
|
||||
Flight::map('error', function (\Exception $ex) {
|
||||
$code = 500;
|
||||
if ($ex instanceof InvalidKeyException) {
|
||||
$code = 401;
|
||||
} else if ($ex instanceof InvalidHashException) {
|
||||
} elseif ($ex instanceof InvalidHashException) {
|
||||
$code = 412;
|
||||
}
|
||||
Flight::response()->status($code)->write($ex->getMessage())->send();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue