53048e6147
All checks were successful
continuous-integration/drone/push Build is passing
Fixing 404 error on https://db.sp-tarkov.com/search and subpaths (https://db.sp-tarkov.com/search/5cc9a96cd7f00c011c04e04a for example) ![image](/attachments/45627308-515f-4f49-9932-0e0234c653fe) Reviewed-on: SPT-AKI/Website#33 Co-authored-by: shirito <shirito@noreply.dev.sp-tarkov.com> Co-committed-by: shirito <shirito@noreply.dev.sp-tarkov.com>
35 lines
1.0 KiB
PHP
35 lines
1.0 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 view('app');
|
|
});
|
|
$router->get('/search', function () {
|
|
return view('app');
|
|
});
|
|
|
|
$router->group(['prefix' => 'search'], function () use ($router) {
|
|
$router->get('/{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', 'ItemController@getItem');
|
|
});
|
|
|