Route change; message update

parent 4ef5f4ba
...@@ -117,12 +117,7 @@ class App ...@@ -117,12 +117,7 @@ class App
} }
} else { } else {
// malformed id input // malformed id input
return $res->withJson(['message' => 'Malformed AMKA'], 500); return $res->withJson(['message' => 'Error: Service call parameters error, amka id must be a 11 digit number'], 400);
}
if (preg_match('/^[[:alpha:]Α-ΩΆΈΉΊΌΎΏ\s]+$/', urldecode($surname)) !== 1) {
// malformed surname input
return $res->withJson(['message' => 'Malformed surname'], 500);
} }
$data = [ $data = [
......
<?php <?php
$app->get('/amka/{amka}/{surname}/[{extended}]', '\Gr\Gov\Minedu\Osteam\Slim\App:validateAmka') $app->get('/amka/{amka}/{surname}[/{extended}]', '\Gr\Gov\Minedu\Osteam\Slim\App:validateAmka')
->setName('amka'); ->setName('amka');
$app->any('/[{anythingelse}]', function ($request, $response, $args) { $app->any('/[{anythingelse}]', function ($request, $response, $args) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment