fix: /api/briefing/weather returns card-format data for WeatherCard component

This commit is contained in:
2026-03-28 12:30:11 -04:00
parent 7fdb2ee39d
commit 6da4b098e3
+7 -2
View File
@@ -129,8 +129,13 @@ async def recent_items():
@briefing_bp.route("/weather", methods=["GET"])
@_REQUIRE
async def get_weather():
data = await weather_svc.get_cached_weather(g.user.id)
return jsonify({"locations": data})
rows = await weather_svc.get_cached_weather_rows(g.user.id)
temp_unit = await get_setting(g.user.id, "temperature_unit", "C")
cards = [
card for row in rows
if (card := weather_svc.parse_weather_card_data(row, temp_unit)) is not None
]
return jsonify({"locations": cards})
@briefing_bp.route("/weather/geocode", methods=["POST"])