refactor: cleanup temp files, centralize API URL, and dynamic routing
- 불필요한 마이그레이션 스크립트, JSON 덤프, 백업 폴더 일괄 삭제 - 프론트엔드 API_BASE_URL 상수 도입 및 하드코딩된 API 엔드포인트 통합 - 백엔드(server.js) GET/POST 라우팅 구조를 Map 기반 동적 라우팅으로 리팩토링 - 미사용 dummyDataGenerator 제거
This commit is contained in:
@@ -4,6 +4,7 @@ import { openSwUserModal } from './SWUserModal';
|
||||
import { createIcons, History, Plus, X, Save, Edit2, RotateCcw, Calendar } from 'lucide';
|
||||
import { CORP_LIST } from './SharedData';
|
||||
import { ASSET_SCHEMA, UI_TEXT } from '../../core/schema';
|
||||
import { API_BASE_URL } from '../../core/utils';
|
||||
import {
|
||||
generateOptionsHTML,
|
||||
setFieldValue,
|
||||
@@ -433,7 +434,7 @@ export function initSwModal(onSave: () => void, closeModals: () => void) {
|
||||
};
|
||||
|
||||
// Call generic API for logs (could be added to state.ts)
|
||||
await fetch(`http://${location.hostname}:3000/api/asset/history/batch`, {
|
||||
await fetch(`${API_BASE_URL}/api/asset/history/batch`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify([...state.masterData.logs, log])
|
||||
|
||||
Reference in New Issue
Block a user