* initial api stuff

This commit is contained in:
Danyi Dávid
2018-05-11 10:46:00 +02:00
parent 77325b8e94
commit be7bc7279d
48 changed files with 3793 additions and 325 deletions

View File

@@ -36,6 +36,20 @@ return function (Application $app, MiddlewareFactory $factory, ContainerInterfac
$app->get('/', App\Handler\HomePageHandler::class, 'home');
$app->get('/api/ping', App\Handler\PingHandler::class, 'api.ping');
$app->get('/api/years', App\Handler\Api\YearsHandler::class, 'api.years');
$app->route(
'/api/judge[/{id:\d+}]',
App\Handler\Api\JudgesHandler::class,
['GET','POST','PUT','DELETE'],
'api.judges'
);
$app->route(
'/api/awardee[/{id:\d+}]',
App\Handler\Api\AwardeeHandler::class,
['GET','POST','PUT','DELETE'],
'api.awardees'
);
$app->get('/the-prize', App\Handler\PrizeRedirectHandler::class, 'the-prize');
$app->get(
'/the-prize/{article:background-and-purpose|description-and-values|aspects-for-selection|gran-prize-award-events}',