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:
@@ -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:]))})
|
||||||
|
|||||||
Reference in New Issue
Block a user