From 864a0ebbd94f1253815f9bac59763e5209d2ab62 Mon Sep 17 00:00:00 2001 From: happybell80 Date: Thu, 4 Dec 2025 21:47:31 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=EA=B0=84=EA=B2=B0=ED=95=98=EA=B2=8C=20?= =?UTF-8?q?=EC=A0=95=EB=A6=AC=20-=20preferences=20404=20=ED=95=B4=EA=B2=B0?= =?UTF-8?q?=20(gateway=20double=20slash=20=EC=88=98=EC=A0=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...frontend_backend_preferences_API_연동_완료.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 반환 ✅