diff --git a/server.py b/server.py index 8730984..9c24137 100644 --- a/server.py +++ b/server.py @@ -1584,7 +1584,7 @@ def list_checkins( @app.get("/api/checkins/{checkin_id}") def get_checkin(checkin_id: int): conn = get_db() - row = conn.execute("SELECT * FROM checkins WHERE id = ?", (checkin_id,)).fetchone() + row = conn.execute("SELECT c.*, u.username FROM checkins c LEFT JOIN users u ON c.user_id = u.id WHERE c.id = ?", (checkin_id,)).fetchone() if row is None: conn.close() raise HTTPException(status_code=404, detail="Checkin not found")