shirito f23acb81a8 feat: add names and nameByID endpoints (#37)
resolves #35
resolves #36

Co-authored-by: Ereshkigal <ereshkigal@noreply.dev.sp-tarkov.com>
Co-authored-by: Shirito <mangiang@orange.fr>
Reviewed-on: SPT-AKI/Website#37
Co-authored-by: shirito <shirito@noreply.dev.sp-tarkov.com>
Co-committed-by: shirito <shirito@noreply.dev.sp-tarkov.com>
2022-04-20 13:28:19 +00:00

34 lines
1.1 KiB
PHP

<?php
/** @var \Laravel\Lumen\Routing\Router $router */
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
$router->get('/', function () {
return redirect('/search');
});
$router->get('/search[/{id}]', function () {
return view('app');
});
$router->group(['prefix' => 'api'], function () use ($router) {
$router->get('locales', 'ItemController@getLocales');
$router->get('refresh', 'ItemController@refreshAllCache');
$router->post('search', 'ItemController@search');
$router->get('item/hierarchy', 'ItemController@getHierarchy');
$router->get('item/names', 'ItemController@getAllItemsName');
$router->get('item/nameByID', 'ItemController@getItemNameByID');
$router->get('item', 'ItemController@getItem');
});