MCPcopy Create free account
hub / github.com/ImGoodBai/MapGoGoGo / update_status

Function update_status

backend/app/main.py:604–615  ·  view source on GitHub ↗
(challenge_id: str, payload: StatusIn)

Source from the content-addressed store, hash-verified

602
603@app.post("/api/admin/challenges/{challenge_id}/status")
604def update_status(challenge_id: str, payload: StatusIn) -> dict:
605 with connect() as conn:
606 cur = conn.execute(
607 "UPDATE challenges SET status = ? WHERE id = ?",
608 (payload.status, challenge_id),
609 )
610 if cur.rowcount == 0:
611 raise HTTPException(status_code=404, detail="Challenge not found")
612 row = conn.execute(
613 "SELECT * FROM challenges WHERE id = ?", (challenge_id,)
614 ).fetchone()
615 return {"challenge": public_challenge(conn, row)}
616
617
618frontend_dist = ROOT_DIR / "frontend" / "dist"

Callers

nothing calls this directly

Calls 2

connectFunction · 0.85
public_challengeFunction · 0.85

Tested by

no test coverage detected