feat(profile): GET /api/profile/observations returns recent raw entries

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-12 14:36:42 -04:00
parent fc6ebf81eb
commit 4e9eead3ab
+10
View File
@@ -59,3 +59,13 @@ async def clear_observations():
uid = get_current_user_id() uid = get_current_user_id()
await clear_learned_data(uid) await clear_learned_data(uid)
return jsonify({"status": "ok"}) return jsonify({"status": "ok"})
@profile_bp.route("/observations", methods=["GET"])
@login_required
async def list_observations():
uid = get_current_user_id()
profile = await get_profile(uid)
raw = list(profile.observations_raw or [])
# Newest first, last 14 entries
return jsonify({"observations": list(reversed(raw[-14:]))})