Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Polish: Standardize remaining fetch calls in Login and FirstRunSetup
rcourtmanea901bac4324
diff --git a/frontend-modern/src/components/FirstRunSetup.tsx b/frontend-modern/src/components/FirstRunSetup.tsxindex 32448a8636..c6155f9023 100644--- a/frontend-modern/src/components/FirstRunSetup.tsx+++ b/frontend-modern/src/components/FirstRunSetup.tsx@@ -163,10 +163,9 @@ export const FirstRunSetup: Component<{ force?: boolean; showLegacyBanner?: boolheaders['X-Setup-Token'] = bootstrapToken().trim();}- const response = await fetch('/api/security/quick-setup', {+ const result = await apiFetchJSON<{ skipped?: boolean }>('/api/security/quick-setup', {method: 'POST',headers,- credentials: 'include', // Include cookies for CSRFbody: JSON.stringify({username: username(),password: finalPassword,@@ -176,13 +175,6 @@ export const FirstRunSetup: Component<{ force?: boolean; showLegacyBanner?: bool}),});- if (!response.ok) {- const error = await response.text();- throw new Error(error || 'Failed to setup security');- }-- const result = await response.json();-if (result.skipped) {// Shouldn't happen in first-run, but handle itwindow.location.reload();diff --git a/frontend-modern/src/components/Login.tsx b/frontend-modern/src/components/Login.tsxindex 9bffe433cc..3dae8e7b05 100644--- a/frontend-modern/src/components/Login.tsx+++ b/frontend-modern/src/components/Login.tsx@@ -228,13 +228,13 @@ export const Login: Component<LoginProps> = (props) => {} catch (_err) {// Try the old method as fallbacktry {- const response = await fetch('/api/state', {+ const response = await apiClient.fetch('/api/state', {headers: {Authorization: `Basic ${btoa(`${username()}:${password()}`)}`,'X-Requested-With': 'XMLHttpRequest',Accept: 'application/json',},- credentials: 'include',+ skipAuth: true,});if (response.ok) {