9 lines
250 B
Python
9 lines
250 B
Python
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)
|