feat: backend servis iskeletini ve yönetim uçlarını ekle
This commit is contained in:
8
backend/app/telegram/auth.py
Normal file
8
backend/app/telegram/auth.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.db import AuthorizedUserORM
|
||||
|
||||
|
||||
def is_authorized(session: Session, telegram_user_id: int) -> bool:
|
||||
record = session.get(AuthorizedUserORM, telegram_user_id)
|
||||
return bool(record and record.is_active)
|
||||
Reference in New Issue
Block a user