This commit is contained in:
2022-08-20 22:17:17 +02:00
parent 58c905acf5
commit 35d7e4000a
29 changed files with 619 additions and 131 deletions

View File

@@ -21,7 +21,7 @@ class ApiRoute extends AbstractRoute {
if (empty($params["endpoint"])) {
header("Content-Type: text/html");
$document = new \Elements\TemplateDocument($router, "swagger.twig");
return $document->getCode();
return $document->load();
} else if (!preg_match("/[a-zA-Z]+/", $params["endpoint"])) {
http_response_code(400);
$response = createError("Invalid Method");