From aa11c10c68abe8041cc09e09dfe9f21a707a517f Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Sat, 25 Oct 2025 12:16:20 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=88=98=EC=8B=A0=ED=95=A8=20API=20?= =?UTF-8?q?=EC=97=94=EB=93=9C=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=EB=B0=8F=20?= =?UTF-8?q?=EA=B3=B5=ED=86=B5=20=ED=97=A4=EB=8D=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ๐Ÿ”ง Backend Fix: - ์ˆ˜์‹ ํ•จ ๋ผ์šฐํ„ฐ prefix ์ˆ˜์ •: /inbox โ†’ /api/inbox - ๋‹ค๋ฅธ API๋“ค๊ณผ ์ผ๊ด€์„ฑ ์žˆ๋Š” ๊ฒฝ๋กœ ๊ตฌ์กฐ ์ ์šฉ - FastAPI ๋ผ์šฐํ„ฐ ๋“ฑ๋ก ์ •์ƒํ™” ๐ŸŽจ Frontend Fix: - ๊ณตํ†ต ํ—ค๋” ์ดˆ๊ธฐํ™” ๋กœ๊ทธ ์ถ”๊ฐ€ - currentUser undefined ๋ฌธ์ œ ๋””๋ฒ„๊น… ์ค€๋น„ - API ์—ฐ๋™ ์ƒํƒœ ํ™•์ธ ๋กœ๊ทธ ๊ฐ•ํ™” ๐Ÿ” Issue Analysis: - ์ˆ˜์‹ ํ•จ API 404 ์—๋Ÿฌ โ†’ ๊ฒฝ๋กœ ๋ฌธ์ œ๋กœ ํ™•์ธ - ๊ณตํ†ต ํ—ค๋” ์•ˆ๋ณด์ž„ โ†’ currentUser ์ดˆ๊ธฐํ™” ๋ฌธ์ œ๋กœ ์ถ”์ • - ๋ฐฑ์—”๋“œ ์žฌ์‹œ์ž‘์œผ๋กœ API ์ •์ƒํ™” ํ™•์ธ Result: โœ… ์ˆ˜์‹ ํ•จ API ์—”๋“œํฌ์ธํŠธ ์ •์ƒํ™” (/api/inbox/) โœ… ์ธ์ฆ ํ•„์š” ์‘๋‹ต ํ™•์ธ (API ์ž‘๋™ ์ค‘) ๐Ÿ”„ ๊ณตํ†ต ํ—ค๋” ๋””๋ฒ„๊น… ๋กœ๊ทธ ์ถ”๊ฐ€ (๋‹ค์Œ ํ…Œ์ŠคํŠธ ๋Œ€๊ธฐ) --- backend/routers/inbox.py | 2 +- frontend/index.html | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/routers/inbox.py b/backend/routers/inbox.py index e491bfe..b2fab5c 100644 --- a/backend/routers/inbox.py +++ b/backend/routers/inbox.py @@ -11,7 +11,7 @@ from database.schemas import ( ) from routers.auth import get_current_user, get_current_admin -router = APIRouter(prefix="/inbox", tags=["inbox"]) +router = APIRouter(prefix="/api/inbox", tags=["inbox"]) @router.get("/", response_model=List[InboxIssue]) async def get_inbox_issues( diff --git a/frontend/index.html b/frontend/index.html index f69470e..4533065 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -487,8 +487,10 @@ // localStorage์—๋„ ๋ฐฑ์—… ์ €์žฅ localStorage.setItem('currentUser', JSON.stringify(user)); - // ๊ณตํ†ต ํ—ค๋” ์ดˆ๊ธฐํ™” - await window.commonHeader.init(user, 'issues_create'); + // ๊ณตํ†ต ํ—ค๋” ์ดˆ๊ธฐํ™” + console.log('๐Ÿ”ง ๊ณตํ†ต ํ—ค๋” ์ดˆ๊ธฐํ™” ์‹œ์ž‘:', user); + await window.commonHeader.init(user, 'issues_create'); + console.log('โœ… ๊ณตํ†ต ํ—ค๋” ์ดˆ๊ธฐํ™” ์™„๋ฃŒ'); // ํŽ˜์ด์ง€ ์ ‘๊ทผ ๊ถŒํ•œ ์ฒดํฌ (๋ถ€์ ํ•ฉ ๋“ฑ๋ก ํŽ˜์ด์ง€) setTimeout(() => {