()
| 262 | |
| 263 | @app.get("/api/challenges") |
| 264 | def list_challenges() -> dict: |
| 265 | with connect() as conn: |
| 266 | rows = conn.execute( |
| 267 | """ |
| 268 | SELECT * FROM challenges |
| 269 | ORDER BY created_at DESC |
| 270 | LIMIT 50 |
| 271 | """ |
| 272 | ).fetchall() |
| 273 | return {"challenges": [public_challenge(conn, row) for row in rows]} |
| 274 | |
| 275 | |
| 276 | @app.post("/api/challenges") |
nothing calls this directly
no test coverage detected