routes.php 684 Bytes
Newer Older
Σταύρος Παπαδάκης's avatar
Σταύρος Παπαδάκης committed
1 2
<?php

3
$app->get('/amka/{amka}/{surname}[/{extended}]', '\Gr\Gov\Minedu\Osteam\Slim\App:validateAmka')
4 5
    ->setName('amkaext');
$app->get('/amka/{amka}/{surname}/', '\Gr\Gov\Minedu\Osteam\Slim\App:validateAmka')
6
    ->setName('amka');
7 8
$app->get('/amka/{amka}[/]', '\Gr\Gov\Minedu\Osteam\Slim\App:isAmka')
    ->setName('amkas');
Σταύρος Παπαδάκης's avatar
Σταύρος Παπαδάκης committed
9 10 11 12 13 14 15 16 17 18

$app->any('/[{anythingelse}]', function ($request, $response, $args) {
    $this->logger->info("Void response, no action route was enabled");
    return $response->withJson([
                'message' => 'Δεν αναγνωρίστηκε το αίτημα σας',
                'in' => var_export($args, true)
                    ], 404
    );
});