From 78c6f5415a9bbff4591da47b3b15cd9c6608a5cf Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 5 Aug 2026 03:13:52 -0500 Subject: [PATCH] refac --- cptr/models/users.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cptr/models/users.py b/cptr/models/users.py index 514064a..e14ac72 100644 --- a/cptr/models/users.py +++ b/cptr/models/users.py @@ -145,6 +145,12 @@ class Auth(Base): ) return result.scalar_one_or_none() + @staticmethod + async def get_by_user_id(user_id: str) -> Auth | None: + async with await get_db() as db: + result = await db.execute(select(Auth).where(Auth.user_id == user_id)) + return result.scalar_one_or_none() + @staticmethod async def username_exists(username: str) -> bool: async with await get_db() as db: