forked from mtusi2026/mtusi2026lab2
feat-(routes updating)
This commit is contained in:
@@ -17,6 +17,10 @@ class SessionRepo(DatabaseManager):
|
||||
result = await super().get_by_field("token_hash", token_hash)
|
||||
return result
|
||||
|
||||
async def delete_by_token_hash(self, token_hash: str) -> bool:
|
||||
async def get_by_user_id(self, user_id: str) -> Optional[Session]:
|
||||
result = await super().get_by_field("user_id", user_id)
|
||||
return result
|
||||
|
||||
async def delete_by_user_id(self, token_hash: str) -> bool:
|
||||
result = await super().delete_by_field("token_hash", token_hash)
|
||||
return result
|
||||
Reference in New Issue
Block a user