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

Method get_projects_by_token

src/core/database.py:1138–1147  ·  view source on GitHub ↗

Get all projects for a token

(self, token_id: int)

Source from the content-addressed store, hash-verified

1136 return None
1137
1138 async def get_projects_by_token(self, token_id: int) -> List[Project]:
1139 """Get all projects for a token"""
1140 async with self._connect() as db:
1141 db.row_factory = aiosqlite.Row
1142 cursor = await db.execute(
1143 "SELECT * FROM projects WHERE token_id = ? ORDER BY created_at DESC",
1144 (token_id,)
1145 )
1146 rows = await cursor.fetchall()
1147 return [Project(**dict(row)) for row in rows]
1148
1149 async def delete_project(self, project_id: str):
1150 """Delete project"""

Callers 3

delete_tokenMethod · 0.80
ensure_project_existsMethod · 0.80

Calls 2

_connectMethod · 0.95
ProjectClass · 0.85

Tested by

no test coverage detected