remove now redundant api prefix, nginx handels that

This commit is contained in:
j3d1 2019-12-01 00:50:52 +01:00
parent 36c6876d93
commit 77450dfff9

View file

@ -15,10 +15,9 @@ $router->get('/', function () use ($router) {
return $router->app->version();
});
$router->group(['prefix' => 'api'], function () use ($router) {
$router->group(['prefix' => '1'], function () use ($router) {
// events
$router->get('events', ['uses' => 'EventController@showAllEvents']);
$router->get('event/{id}', ['uses' => 'EventController@showOneEvent']);
$router->post('event', ['uses' => 'EventController@create']);
@ -33,12 +32,10 @@ $router->group(['prefix' => 'api'], function () use ($router) {
$router->put('box/{id}', ['uses' => 'ContainerController@update']);
// items
$router->get('items', ['uses' => 'ItemController@showAllItems']);
$router->get('items/{query}', ['uses' => 'ItemController@searchAllItems']);
$router->get('item/{id}', ['uses' => 'ItemController@showOneItem']);
$router->post('item', ['uses' => 'ItemController@create']);
$router->delete('item/{id}', ['uses' => 'ItemController@delete']);
$router->put('item/{id}', ['uses' => 'ItemController@update']);
});
$router->get('{event}/items', ['uses' => 'ItemController@showAllItems']);
$router->get('{event}/items/{query}', ['uses' => 'ItemController@searchAllItems']);
$router->get('{event}/item/{id}', ['uses' => 'ItemController@showOneItem']);
$router->post('{event}/item', ['uses' => 'ItemController@create']);
$router->delete('{event}/item/{id}', ['uses' => 'ItemController@delete']);
$router->put('{event}/item/{id}', ['uses' => 'ItemController@update']);
});