Get all projects for a token
(self, token_id: int)
| 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""" |
no test coverage detected