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

Function record_event

backend/app/main.py:179–203  ·  view source on GitHub ↗
(
    conn,
    challenge_id: str,
    participant_id: str,
    reason: str,
    position: PositionIn,
)

Source from the content-addressed store, hash-verified

177
178
179def 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")

Callers 1

submit_positionFunction · 0.85

Calls 2

new_idFunction · 0.85
now_isoFunction · 0.85

Tested by

no test coverage detected