* changed routes while debuging endpoints

* added corsmiddlewarefactory
* changing teams is now possible
This commit is contained in:
Dávid Danyi
2018-04-09 18:41:04 +02:00
parent 1143075e17
commit 117c10a56a
5 changed files with 62 additions and 9 deletions

View File

@@ -21,6 +21,7 @@ return [
// Use 'factories' for services provided by callbacks/factory classes.
'factories' => [
// Fully\Qualified\ClassName::class => Fully\Qualified\FactoryName::class,
Tuupola\Middleware\CorsMiddleware::class => DoctrineExpressiveModule\Middleware\CorsMiddlewareFactory::class,
],
],
];

View File

@@ -36,6 +36,11 @@ 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->route('/api/team[/{id:\d+}]', App\Handler\TeamHandler::class)->setName('api.team');
$app->get('/api/team', App\Handler\TeamHandler::class,'api.team.list');
$app->get('/api/team/{id:\d+}', App\Handler\TeamHandler::class,'api.team.get');
$app->post('/api/team', App\Handler\TeamHandler::class,'api.team.add');
$app->put('/api/team[/{id:\d+}]', App\Handler\TeamHandler::class,'api.team.change');
$app->delete('/api/team/{id:\d+}', App\Handler\TeamHandler::class,'api.team.delete');
$app->route('/api/slide[/{id:\d+}]', App\Handler\SlideHandler::class)->setName('api.slide');
};