refactor: api/images 변경
This commit is contained in:
parent
92f1e16a69
commit
5de078b0b7
@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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'
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user