mirror of
https://github.com/open-webui/computer.git
synced 2026-11-22 21:50:43 -05:00
refac
This commit is contained in:
1 parent
2a15b61b4f
commit
78c6f5415a
1 file changed
+6
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user