From 7e160c57aa1452b65fcd710094ce1bcf4dd95ced Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 27 Jan 2025 17:08:43 +0300 Subject: [PATCH] feat: ekaterina --- services/auth.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/auth.py b/services/auth.py index 49b2cb4..812f457 100644 --- a/services/auth.py +++ b/services/auth.py @@ -66,6 +66,8 @@ class AuthService(BaseService): raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail='Invalid credentials') user: Union[User, None] = await self.session.scalar(select(User).where(User.telegram_id == request.id)) + if user.is_deleted or user.is_blocked: + raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail='Invalid credentials') if not user: user = User( telegram_id=request.id,