mirror of https://github.com/flarum/flarum
Don't use whoops for API errors
parent
7739217b39
commit
79a7f8d047
4
api.php
4
api.php
|
@ -28,11 +28,7 @@ $router = $app->make('Flarum\Http\RouterMiddleware', ['routes' => $app->make('fl
|
||||||
|
|
||||||
$api->pipe($apiPath, $router);
|
$api->pipe($apiPath, $router);
|
||||||
|
|
||||||
if (Core::inDebugMode()) {
|
|
||||||
$api->pipe(new WhoopsMiddleware());
|
|
||||||
} else {
|
|
||||||
$api->pipe(new JsonApiErrors());
|
$api->pipe(new JsonApiErrors());
|
||||||
}
|
|
||||||
|
|
||||||
$server = Server::createServer(
|
$server = Server::createServer(
|
||||||
$api,
|
$api,
|
||||||
|
|
Loading…
Reference in New Issue