1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-04 02:14:06 +02:00

fix type errors

This commit is contained in:
Robin Appelman 2020-11-29 14:46:19 +01:00
commit 3c3b23d1a3
3 changed files with 17 additions and 1 deletions

View file

@ -69,7 +69,7 @@ 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 (\Throwable $ex) {
$code = 500;
if ($ex instanceof InvalidKeyException) {
$code = 401;