MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / get_token_by_st

Method get_token_by_st

src/core/database.py:972–980  ·  view source on GitHub ↗

Get token by ST

(self, st: str)

Source from the content-addressed store, hash-verified

970 return None
971
972 async def get_token_by_st(self, st: str) -> Optional[Token]:
973 """Get token by ST"""
974 async with self._connect() as db:
975 db.row_factory = aiosqlite.Row
976 cursor = await db.execute("SELECT * FROM tokens WHERE st = ?", (st,))
977 row = await cursor.fetchone()
978 if row:
979 return Token(**dict(row))
980 return None
981
982 async def get_token_by_email(self, email: str) -> Optional[Token]:
983 """Get token by email"""

Callers 1

add_tokenMethod · 0.80

Calls 2

_connectMethod · 0.95
TokenClass · 0.85

Tested by

no test coverage detected