Skip to content

Commit

Permalink
api: Added 404 fallback for bad / invalid calls (#7952)
Browse files Browse the repository at this point in the history
  • Loading branch information
laf committed Jan 6, 2018
1 parent 364b574 commit e2f122a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions html/api_v0.php
Expand Up @@ -33,6 +33,10 @@
require $config['install_dir'] . '/html/includes/api_functions.inc.php';
$app->setName('api');

$app->notFound(function () use ($app) {
api_error(404, "This API route doesn't exist.");
});

$app->group(
'/api',
function () use ($app) {
Expand Down

0 comments on commit e2f122a

Please sign in to comment.