feat: Fix nutrition service and add location-based alerts
All checks were successful
continuous-integration/drone/push Build is passing

Changes:
- Fix nutrition service: add is_active column and Pydantic validation for UUID/datetime
- Add location-based alerts feature: users can now see alerts within 1km radius
- Fix CORS and response serialization in nutrition service
- Add getCurrentLocation() and loadAlertsNearby() functions
- Improve UI for nearby alerts display with distance and response count
This commit is contained in:
2025-12-13 16:34:50 +09:00
parent 3050e084fa
commit cfc93cb99a
34 changed files with 7016 additions and 17 deletions

View File

@@ -547,6 +547,12 @@ async def user_service_proxy(
@app.api_route("/api/v1/emergency/alerts", methods=["GET"], operation_id="emergency_alerts_get")
@app.api_route("/api/v1/emergency/alerts/my", methods=["GET"], operation_id="emergency_alerts_my_get")
@app.api_route("/api/v1/emergency/alerts/nearby", methods=["GET"], operation_id="emergency_alerts_nearby_get")
@app.api_route("/api/v1/alert", methods=["POST"], operation_id="alert_create_post")
@app.api_route("/api/v1/alerts/my", methods=["GET"], operation_id="alerts_my_get")
@app.api_route("/api/v1/alerts/active", methods=["GET"], operation_id="alerts_active_get")
@app.api_route("/api/v1/alerts/nearby", methods=["GET"], operation_id="alerts_nearby_get")
@app.api_route("/api/v1/emergency/alerts", methods=["POST"], operation_id="emergency_alerts_post")
@app.api_route("/api/v1/emergency/alerts", methods=["GET"], operation_id="emergency_alerts_get")
@app.api_route("/api/v1/emergency/alerts/{alert_id}", methods=["GET"], operation_id="emergency_alert_get")
@app.api_route("/api/v1/emergency/alerts/{alert_id}", methods=["PATCH"], operation_id="emergency_alert_patch")
@app.api_route("/api/v1/emergency/alerts/{alert_id}", methods=["DELETE"], operation_id="emergency_alert_delete")
@@ -612,6 +618,7 @@ async def location_service_proxy(request: Request):
# Calendar Service routes
@app.api_route("/api/v1/calendar/entry", methods=["POST"], operation_id="calendar_entry_mobile_post")
@app.api_route("/api/v1/calendar/entries", methods=["GET"], operation_id="calendar_entries_get")
@app.api_route("/api/v1/calendar/entries", methods=["POST"], operation_id="calendar_entries_post")
@app.api_route("/api/v1/calendar/entries/{entry_id}", methods=["GET"], operation_id="calendar_entry_get")
@@ -651,6 +658,7 @@ async def calendar_service_proxy(request: Request):
# Notification Service routes
@app.api_route("/notify", methods=["POST"], operation_id="notify_post")
@app.api_route("/api/v1/notifications/devices", methods=["GET"], operation_id="notifications_devices_get")
@app.api_route("/api/v1/notifications/devices", methods=["POST"], operation_id="notifications_devices_post")
@app.api_route("/api/v1/notifications/devices/{device_id}", methods=["DELETE"], operation_id="notifications_device_delete")