codegen
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-11 22:51:57 +03:00
parent a0b2d2584d
commit 4f63b48ca2
3 changed files with 27 additions and 4 deletions

View file

@ -95,8 +95,10 @@ extension GetItInjectableX on _i1.GetIt {
gh<_i16.StatisticsCalculator>(),
gh<_i3.AchievementManager>(),
));
gh.lazySingleton<_i23.AdminAuthApiV2>(
() => _i23.AdminAuthApiV2(gh<_i20.TelegramAuthCodeService>()));
gh.lazySingleton<_i23.AdminAuthApiV2>(() => _i23.AdminAuthApiV2(
gh<_i20.TelegramAuthCodeService>(),
gh<_i22.UserManager>(),
));
gh.lazySingleton<_i24.AuthApiV2>(() => _i24.AuthApiV2(
gh<_i22.UserManager>(),
gh<_i11.GoogleApi>(),

View file

@ -18,6 +18,11 @@ Router _$AdminAuthApiV2Router(AdminAuthApiV2 service) {
r'/admin/auth/verify-code',
service.verifyCode,
);
router.add(
'GET',
r'/admin/auth/code-status/<code>',
service.getCodeStatus,
);
router.add(
'GET',
r'/admin/auth/me',

View file

@ -628,7 +628,7 @@ paths:
tags:
- AdminAuthApiV2
summary: requestCode
description: "POST /api/v2/admin/auth/request-code\nRequest authentication code to be sent to all admin Telegram accounts"
description: "POST /api/v2/admin/auth/request-code\nGenerate a web authentication code for admin login\nSimilar to /api/v2/auth/telegram/web-code but for admin panel"
operationId: requestCode
responses:
200:
@ -638,11 +638,27 @@ paths:
tags:
- AdminAuthApiV2
summary: verifyCode
description: "POST /api/v2/admin/auth/verify-code\nVerify authentication code and return JWT token"
description: "POST /api/v2/admin/auth/verify-code\nVerify authentication code and return JWT token\nCode must be claimed by an admin Telegram user"
operationId: verifyCode
responses:
200:
description: "Operation completed!"
/admin/auth/code-status/<code>:
get:
tags:
- AdminAuthApiV2
summary: getCodeStatus
description: "GET /api/v2/admin/auth/code-status/<code>\nGet current status for an admin authentication code"
operationId: getCodeStatus
parameters:
- name: code
in: path
required: true
schema:
type: string
responses:
200:
description: "Operation completed!"
/admin/auth/me:
get:
tags: