remove now redundant api prefix, nginx handels that
This commit is contained in:
parent
36c6876d93
commit
77450dfff9
1 changed files with 20 additions and 23 deletions
|
@ -15,30 +15,27 @@ $router->get('/', function () use ($router) {
|
||||||
return $router->app->version();
|
return $router->app->version();
|
||||||
});
|
});
|
||||||
|
|
||||||
$router->group(['prefix' => 'api'], function () use ($router) {
|
$router->group(['prefix' => '1'], function () use ($router) {
|
||||||
|
// events
|
||||||
|
|
||||||
$router->group(['prefix' => '1'], function () use ($router) {
|
$router->get('events', ['uses' => 'EventController@showAllEvents']);
|
||||||
// events
|
$router->get('event/{id}', ['uses' => 'EventController@showOneEvent']);
|
||||||
$router->get('events', ['uses' => 'EventController@showAllEvents']);
|
$router->post('event', ['uses' => 'EventController@create']);
|
||||||
$router->get('event/{id}', ['uses' => 'EventController@showOneEvent']);
|
$router->delete('event/{id}', ['uses' => 'EventController@delete']);
|
||||||
$router->post('event', ['uses' => 'EventController@create']);
|
$router->put('event/{id}', ['uses' => 'EventController@update']);
|
||||||
$router->delete('event/{id}', ['uses' => 'EventController@delete']);
|
|
||||||
$router->put('event/{id}', ['uses' => 'EventController@update']);
|
|
||||||
|
|
||||||
// containers
|
// containers
|
||||||
$router->get('boxes', ['uses' => 'ContainerController@showAllContainers']);
|
$router->get('boxes', ['uses' => 'ContainerController@showAllContainers']);
|
||||||
$router->get('box/{id}', ['uses' => 'ContainerController@showOneContainer']);
|
$router->get('box/{id}', ['uses' => 'ContainerController@showOneContainer']);
|
||||||
$router->post('box', ['uses' => 'ContainerController@create']);
|
$router->post('box', ['uses' => 'ContainerController@create']);
|
||||||
$router->delete('box/{id}', ['uses' => 'ContainerController@delete']);
|
$router->delete('box/{id}', ['uses' => 'ContainerController@delete']);
|
||||||
$router->put('box/{id}', ['uses' => 'ContainerController@update']);
|
$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']);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
// items
|
||||||
|
$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']);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue