Роуты /api/ и некоторые мелочи по контроллерам

This commit is contained in:
2025-07-19 21:20:30 +08:00
parent 36c3570e05
commit 5c4554b9f9
6 changed files with 36 additions and 42 deletions

View File

@@ -6,6 +6,7 @@
*/
use App\Controllers\ApiController;
use App\Controllers\BasicController;
use App\Controllers\BotController;
use App\Controllers\WebController;
@@ -56,13 +57,13 @@ return [
[
'method' => 'GET',
'path' => '/{code:[0-9a-zA-Z]+}/json',
'handler' => [ApiController::class, 'json'],
'name' => 'json',
'path' => '/api/playlists/{code:[0-9a-zA-Z]+}',
'handler' => [ApiController::class, 'getOne'],
'name' => 'api::getOne',
],
[
'method' => 'GET',
'path' => '/{code:[0-9a-zA-Z]+}/qrcode',
'path' => '/api/playlists/{code:[0-9a-zA-Z]+}/qrcode',
'handler' => [ApiController::class, 'makeQrCode'],
'name' => 'api::makeQrCode',
],