back
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions

This commit is contained in:
Dmitry 2025-12-14 21:28:26 +03:00
parent 3ead5ed139
commit 5df622e574

View file

@ -17,6 +17,8 @@ import 'v2/promocodes_api_v2.dart';
import 'v2/subscriptions_api_v2.dart';
import 'v2/tasks_api_v2.dart';
import 'v2/tests_api_v2.dart';
import 'v2/telegram_bot_api_v2.dart';
import 'v2/users_api_v2.dart';
import 'v2/authorize_v2.dart';
import 'v2/telegram_bot_auth_middleware.dart';
import 'v2/jwt_service.dart';
@ -56,17 +58,8 @@ class MnemoShelf {
v2Router.mount('/', getIt.get<SubscriptionsApiV2>().router);
v2Router.mount('/', getIt.get<DiscountsApiV2>().router);
v2Router.mount('/', getIt.get<TasksApiV2>().handler);
// Note: rootRouter is not used because we manually route to v1/v2 handlers
// for different authentication middleware. Keeping for reference.
// final rootRouter = Router()
// ..mount('/', v1Router) // Legacy v1 APIs
// ..mount('/api/v2', v2Router); // New v2 APIs
// ..mount(
// '/swagger',
// SwaggerUI('public/open_api.yaml', title: 'Api'),
// )
// ..mount('/', createStaticHandler('public'));
v2Router.mount('/', getIt.get<UsersApiV2>().router);
v2Router.mount('/', getIt.get<TelegramBotApiV2>().router);
// Configure a pipeline with proper CORS configuration
final corsConfig = {