This commit is contained in:
Timothy Jaeryang Baek
2026-08-05 03:13:52 -05:00
Unverified
parent 2a15b61b4f
commit 78c6f5415a
+6
View File
@@ -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: