Transform ApiResponse::error() into dynamic method

This commit is contained in:
Philipp 2021-11-12 20:04:47 +01:00
parent ea0f41ecf0
commit ebf56674f1
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
3 changed files with 5 additions and 5 deletions

View file

@ -283,7 +283,7 @@ function api_call(App $a, App\Arguments $args = null)
Logger::warning(API_LOG_PREFIX . 'not implemented', ['module' => 'api', 'action' => 'call', 'query' => DI::args()->getQueryString()]);
throw new NotFoundException();
} catch (HTTPException $e) {
ApiResponse::error($e->getCode(), $e->getDescription(), $e->getMessage(), $type);
DI::apiResponse()->error($e->getCode(), $e->getDescription(), $e->getMessage(), $type);
}
}