fix: model, name

This commit is contained in:
TheNoxium
2025-06-03 13:01:10 +05:00
parent 31236d558f
commit c60d19262e
12 changed files with 59 additions and 114 deletions

View File

@@ -2,7 +2,9 @@ from typing import Optional
from sqlalchemy.ext.asyncio import AsyncConnection
from api.db.logic.auth import get_user
# # from backend.schemas.users.token import TokenData
from api.schemas.account.account import User,Status
from api.schemas.account.account import User
from api.db.tables.account import AccountStatus
from api.utils.hasher import Hasher
@@ -14,7 +16,7 @@ async def authenticate_user(
sql_user,sql_password = await get_user(connection, username)
if not sql_user or sql_user.status != Status.ACTIVE :
if not sql_user or sql_user.status != AccountStatus.ACTIVE :
return None
hasher = Hasher()
if not hasher.verify_data(password, sql_password.key_value):