diff --git a/src/bot/services/verification.py b/src/bot/services/verification.py index df86b84..cf729ca 100644 --- a/src/bot/services/verification.py +++ b/src/bot/services/verification.py @@ -1,5 +1,4 @@ __all__ = [ - "check_registration_status", "verify_student" ] @@ -13,32 +12,11 @@ from src.database.models import Student, TelegramUser from .types.verification_statuses import VerificationStatus -async def check_registration_status( - tg_id: int, - session: AsyncSession, -) -> bool: - """ - Checks if a tg user is linked to a university member. - - Args: - tg_id (int): user's telegram id. - session (AsyncSession): database session. - - Returns: - bool: True if the user is registered (linked), otherwise False. - """ - query = select(TelegramUser).where(TelegramUser.id == tg_id) - result = await session.execute(query) - user = result.scalar_one_or_none() - - return user is not None and user.university_member_id is not None - - async def verify_student( tg_user: TelegramUser, name: str, student_id: int, - group_id: int, + group_id: str, session: AsyncSession, ) -> VerificationStatus: """