fix: Use absolute API paths in upload modal and fix cloud endpoint
This commit is contained in:
@@ -198,15 +198,16 @@ async function confirmUpload() {
|
||||
const data = parsedData[tab];
|
||||
let endpoint = '';
|
||||
|
||||
if (tab === '개인PC') endpoint = '/api/pc/batch';
|
||||
else if (tab === '서버') endpoint = '/api/server/batch';
|
||||
else if (tab === '스토리지') endpoint = '/api/storage/batch';
|
||||
else if (tab === '전산비품') endpoint = '/api/equip/batch';
|
||||
else if (tab === '모바일기기') endpoint = '/api/mobile/batch';
|
||||
else if (tab === '구독SW') endpoint = '/api/sw/sub/batch';
|
||||
else if (tab === '영구SW') endpoint = '/api/sw/perm/batch';
|
||||
else if (tab === '클라우드') endpoint = '/api/sw/cloud/batch';
|
||||
else if (tab === '도메인') endpoint = '/api/ops/domain/batch';
|
||||
const API_BASE = `http://${location.hostname}:3000`;
|
||||
if (tab === '개인PC') endpoint = `${API_BASE}/api/pc/batch`;
|
||||
else if (tab === '서버') endpoint = `${API_BASE}/api/server/batch`;
|
||||
else if (tab === '스토리지') endpoint = `${API_BASE}/api/storage/batch`;
|
||||
else if (tab === '전산비품') endpoint = `${API_BASE}/api/equip/batch`;
|
||||
else if (tab === '모바일기기') endpoint = `${API_BASE}/api/mobile/batch`;
|
||||
else if (tab === '구독SW') endpoint = `${API_BASE}/api/sw/sub/batch`;
|
||||
else if (tab === '영구SW') endpoint = `${API_BASE}/api/sw/perm/batch`;
|
||||
else if (tab === '클라우드') endpoint = `${API_BASE}/api/cloud/batch`;
|
||||
else if (tab === '도메인') endpoint = `${API_BASE}/api/ops/domain/batch`;
|
||||
|
||||
if (endpoint) {
|
||||
const response = await fetch(endpoint, {
|
||||
|
||||
Reference in New Issue
Block a user