filter("tg_bot_auth", [\app\modules\tgbot\middlewares\TgBotAuthMiddleware::class, "handler"]); App::$collector->group(["prefix" => "miniapp"], function (CGRouteCollector $router) { App::$collector->get('/', [\app\modules\tgbot\controllers\TgMainController::class, 'actionMain']); App::$collector->group(["before" => "tg_bot_auth"], function (CGRouteCollector $router){ App::$collector->get('/news', [\app\modules\tgbot\controllers\TgMainController::class, 'actionNews']); App::$collector->get('/promo', [\app\modules\tgbot\controllers\TgMainController::class, 'actionPromo']); App::$collector->get('/scanner', [\app\modules\tgbot\controllers\TgMainController::class, 'actionScanner']); App::$collector->get('/card_action/{cardId}', [\app\modules\tgbot\controllers\TgMainController::class, 'actionCardAction']); }); });