From 2d232941da392d0e54616958e107acf7499ef3c6 Mon Sep 17 00:00:00 2001 From: Shawn Date: Mon, 1 Jun 2026 00:27:29 -0400 Subject: [PATCH] Fix single checkin GET to include username via JOIN --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")