diff --git a/src/views/AdminView.vue b/src/views/AdminView.vue index 0c6bdeb..37b72fc 100644 --- a/src/views/AdminView.vue +++ b/src/views/AdminView.vue @@ -1327,9 +1327,13 @@ async function saveConfig() { configSaving.value = true configSaveMsg.value = '' try { + // Try to load current config, but don't fail if it doesn't exist + let currentConfig: any = {} const res = await fetch('/api/v1/admin/config') - if (!res.ok) throw new Error(`Failed to load current config: HTTP ${res.status}`) - const currentConfig = await res.json() + if (res.ok) { + currentConfig = await res.json() + } + // If 404, just use empty currentConfig - we'll create a new file const payload = { version: '1.0.0',