russian errors

This commit is contained in:
2025-12-12 22:14:47 +05:00
parent abf93a91e8
commit 66da0d0e27

View File

@ -68,16 +68,16 @@ class AuthService:
):
user = await users_collection.find_one({"username": username})
if not user:
raise HTTPException(404, "User not found")
raise HTTPException(404, "Пользователь не найден")
if user["is_verified"]:
raise HTTPException(400, "User already verified")
raise HTTPException(400, "Пользователь уже верифицирован")
if user.get("telegram_user_id") and user["telegram_user_id"] != telegram_user_id:
raise HTTPException(403, "This account is linked to another Telegram")
raise HTTPException(403, "Этот аккаунт в Telegram уже привязан к другому пользователем.")
if user.get("code") != code:
raise HTTPException(400, "Invalid code")
raise HTTPException(400, "Инвалид код. Прям как ты")
if telegram_user_id is not None:
existing = await users_collection.find_one({
@ -87,7 +87,7 @@ class AuthService:
if existing:
raise HTTPException(
status_code=403,
detail="This Telegram account is already linked to another user",
detail="Этот аккаунт в Telegram уже привязан к другому пользователем.",
)
update = {