Get token by email
(self, email: str)
| 980 | return None |
| 981 | |
| 982 | async def get_token_by_email(self, email: str) -> Optional[Token]: |
| 983 | """Get token by email""" |
| 984 | async with self._connect() as db: |
| 985 | db.row_factory = aiosqlite.Row |
| 986 | cursor = await db.execute("SELECT * FROM tokens WHERE email = ?", (email,)) |
| 987 | row = await cursor.fetchone() |
| 988 | if row: |
| 989 | return Token(**dict(row)) |
| 990 | return None |
| 991 | |
| 992 | async def get_all_tokens(self) -> List[Token]: |
| 993 | """Get all tokens""" |
no test coverage detected