diff --git a/journey/troubleshooting/250827_frontend_backend_preferences_API_연동_완료.md b/journey/troubleshooting/250827_frontend_backend_preferences_API_연동_완료.md index 70cde2c..bb5aec2 100644 --- a/journey/troubleshooting/250827_frontend_backend_preferences_API_연동_완료.md +++ b/journey/troubleshooting/250827_frontend_backend_preferences_API_연동_완료.md @@ -402,8 +402,12 @@ params.append(time_obj) # datetime.time 객체 --- -## 12. 2025-12-04 업데이트: robeing-monitor preferences 경로/스키마 정리 +## 12. 2025-12-04 업데이트 -- **경로 정리**: robeing-monitor에 `/api/preferences/{user_id}` alias 엔드포인트를 추가하여, Gateway가 프록시하는 경로(`/api/preferences/...`)와 백엔드 실제 경로를 일치시킴. -- **스키마 정리**: user_preference 테이블에서 더 이상 사용하지 않는 `slack_user_id` 컬럼 참조를 제거하고, UUID 기반 `user_id`만으로 조회/UPDATE/INSERT하도록 `app/api/monitor.py`를 수정. -- **기본값 보장**: 레코드가 없는 신규 사용자에 대해서도 404 대신 기본값(`news_keywords=[]`, `briefing_enabled=true`, `briefing_time="09:00"`)을 200 응답으로 반환하는 현재 동작을 재확인하고 유지. +**문제**: Gateway 404 에러 (경로 중복 슬래시 `//api`) +**해결**: +- `robeing-gateway/app/main.py:335`: `f"/api/preferences/{path}"` → `f"api/preferences/{path}"` +- `robeing-monitor/app/main.py`: `/api` prefix 라우터 추가 +- `robeing-monitor/app/api/monitor.py`: slack_user_id 컬럼 참조 제거 + +**결과**: Gateway → robeing-monitor 프록시 정상 작동, 레코드 없어도 기본값 200 반환 ✅