[AI] fix some modules, develop the big part of modules. TODO fix critical errors, update pipeline, test everything

This commit is contained in:
2026-05-16 19:16:50 +07:00
parent 0824033602
commit 1ef93c2025
42 changed files with 2780 additions and 786 deletions
+6 -1
View File
@@ -28,9 +28,14 @@ pub async fn auth_guard(
)
.map_err(|_| AppError::Unauthorized("Invalid session signature".into()))?;
// Парсим внутренний UUID из поля sub токена
let user_id = uuid::Uuid::parse_str(&token_data.claims.sub)
.map_err(|_| AppError::Unauthorized("Invalid token payload structure".into()))?;
// Ищем оперативника в сети по его системному UUID
let user = state
.repo
.get_user_by_tg_id(token_data.claims.tg_id)
.get_user_by_id(user_id)
.await?
.ok_or_else(|| AppError::NotFound("Operative not found in grid".into()))?;