From 5de078b0b74ce984354ba919ea23dd3823db4211 Mon Sep 17 00:00:00 2001 From: OhSeongRak Date: Fri, 20 Jun 2025 10:37:54 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20api/images=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/api.js | 2 +- src/services/menu.js | 2 +- src/views/StoreManagementView.vue | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/api.js b/src/services/api.js index e242f7c..0391c66 100644 --- a/src/services/api.js +++ b/src/services/api.js @@ -14,7 +14,7 @@ const getApiUrls = () => { MENU_URL: config.MENU_URL || 'http://smarketing.20.249.184.228.nip.io/api/menu', SALES_URL: config.SALES_URL || 'http://smarketing.20.249.184.228.nip.io/api/sales', RECOMMEND_URL: config.RECOMMEND_URL || 'http://smarketing.20.249.184.228.nip.io/api/recommendations', - IMAGE_URL: config.IMAGE_URL || 'http://smarketing.20.249.184.228.nip.io/api/images' + IMAGE_URL: config.IMAGE_URL || 'http://smarketing.20.249.184.228.nip.io/api/menu/images' } } diff --git a/src/services/menu.js b/src/services/menu.js index 294451a..bd1afdd 100644 --- a/src/services/menu.js +++ b/src/services/menu.js @@ -182,7 +182,7 @@ class MenuService { console.log('이미지 업로드 요청 - 메뉴 ID:', numericMenuId) // POST /api/menu/images/{menuId} (menuApi 사용) - const response = await menuApi.post(`/images/${numericMenuId}`, formData, { + const response = await menuApi.post(`/menu/images/${numericMenuId}`, formData, { headers: { 'Content-Type': 'multipart/form-data' } diff --git a/src/views/StoreManagementView.vue b/src/views/StoreManagementView.vue index 046ab9c..eca7ffc 100644 --- a/src/views/StoreManagementView.vue +++ b/src/views/StoreManagementView.vue @@ -1145,10 +1145,10 @@ const uploadMenuImage = async (menuId) => { imageApiInstance.defaults.headers.Authorization = `Bearer ${token}` } - console.log('🎯 ImageController로 업로드: /api/images/menu/' + menuId) + console.log('🎯 ImageController로 업로드: /api/menu/images/menu/' + menuId) // ✅ 올바른 전체 경로 지정 - const response = await imageApiInstance.post(`/api/images/menu/${menuId}`, formData) + const response = await imageApiInstance.post(`/api/menu/images/menu/${menuId}`, formData) console.log('이미지 업로드 응답:', response.data)