(
conn,
challenge_id: str,
participant_id: str,
reason: str,
position: PositionIn,
)
| 177 | |
| 178 | |
| 179 | def record_event( |
| 180 | conn, |
| 181 | challenge_id: str, |
| 182 | participant_id: str, |
| 183 | reason: str, |
| 184 | position: PositionIn, |
| 185 | ) -> None: |
| 186 | conn.execute( |
| 187 | """ |
| 188 | INSERT INTO anti_cheat_events |
| 189 | (id, challenge_id, participant_id, reason, lat, lng, accuracy_m, speed_mps, created_at) |
| 190 | VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) |
| 191 | """, |
| 192 | ( |
| 193 | new_id("evt"), |
| 194 | challenge_id, |
| 195 | participant_id, |
| 196 | reason, |
| 197 | position.lat, |
| 198 | position.lng, |
| 199 | position.accuracy_m, |
| 200 | position.speed_mps, |
| 201 | now_iso(), |
| 202 | ), |
| 203 | ) |
| 204 | |
| 205 | |
| 206 | @app.get("/api/health") |
no test coverage detected