temp: save local progress before merge

This commit is contained in:
2026-06-02 10:23:18 +09:00
parent bf7fb0ffe6
commit bb859dddfc
21 changed files with 13296 additions and 171 deletions

View File

@@ -14,16 +14,7 @@ import { createIcons, Plus, X, LayoutDashboard, Monitor, Server, Database, Lapto
// --- DB 저장을 위한 세분화된 헬퍼 함수들 ---
async function apiBatchSave(url: string, data: any[], label: string) {
try {
const response = await fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(data)
});
if (!response.ok) {
const errorData = await response.json().catch(() => ({}));
throw new Error(`${label} DB 저장 실패: ${errorData.error || response.statusText}`);
}
console.log(`${label} DB 저장 완료`);
console.log(`${label} DB 저장 완료 (Dummy Mode: ${data?.length || 0} items)`);
} catch (err) {
console.error(`${label} DB 저장 오류:`, err);
alert(`${label} 저장 중 오류가 발생했습니다: ${(err as any).message}`);