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

Method get_active_tokens

src/core/database.py:1082–1088  ·  view source on GitHub ↗

Get all active tokens

(self)

Source from the content-addressed store, hash-verified

1080 }
1081
1082 async def get_active_tokens(self) -> List[Token]:
1083 """Get all active tokens"""
1084 async with self._connect() as db:
1085 db.row_factory = aiosqlite.Row
1086 cursor = await db.execute("SELECT * FROM tokens WHERE is_active = 1 ORDER BY last_used_at ASC")
1087 rows = await cursor.fetchall()
1088 return [Token(**dict(row)) for row in rows]
1089
1090 async def update_token(self, token_id: int, **kwargs):
1091 """Update token fields"""

Callers

nothing calls this directly

Calls 2

_connectMethod · 0.95
TokenClass · 0.85

Tested by

no test coverage detected