predefined entities + override database entity handler

This commit is contained in:
2023-01-09 17:09:57 +01:00
parent cee54a1946
commit 5ac363d360
5 changed files with 41 additions and 9 deletions

View File

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