feat: add supports for multimodal

This commit is contained in:
Yeuoly
2024-10-22 17:26:00 +08:00
parent 11270a7ef2
commit 1450e5d5cb
10 changed files with 59 additions and 7 deletions

View File

@ -94,7 +94,7 @@ class AccountService:
@staticmethod
def load_user(user_id: str) -> None | Account:
account = Account.query.filter_by(id=user_id).first()
account = db.session.query(Account).filter_by(id=user_id).first()
if not account:
return None
@ -139,7 +139,7 @@ class AccountService:
def authenticate(email: str, password: str, invite_token: Optional[str] = None) -> Account:
"""authenticate account with email and password"""
account = Account.query.filter_by(email=email).first()
account = db.session.query(Account).filter_by(email=email).first()
if not account:
raise AccountNotFoundError()