diff --git a/src_assets/common/assets/web/apps.html b/src_assets/common/assets/web/apps.html index 7e7acb3d..252492dc 100644 --- a/src_assets/common/assets/web/apps.html +++ b/src_assets/common/assets/web/apps.html @@ -599,7 +599,10 @@ fetch("./api/apps/reorder", { credentials: 'include', - method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', body: JSON.stringify({order: reorderedUUIDs}) }) .then(r => r.json()) @@ -636,7 +639,7 @@ this.actionDisabled = true; fetch("./api/apps/launch?uuid=" + app.uuid, { credentials: 'include', - method: "POST", + method: 'POST', }) .then(r => r.json()) .then(r => { @@ -655,7 +658,7 @@ this.actionDisabled = true; fetch("./api/apps/close", { credentials: 'include', - method: "POST" + method: 'POST', }) .then((r) => r.json()) .then((r) => { @@ -681,7 +684,7 @@ this.actionDisabled = true; fetch("./api/apps/delete?uuid=" + app.uuid, { credentials: 'include', - method: "POST" + method: 'POST' }).then((r) => r.json()) .then((r) => { if (!r.status) { @@ -789,7 +792,10 @@ this.coverFinderBusy = true; fetch("./api/covers/upload", { credentials: 'include', - method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', body: JSON.stringify({ key: cover.key, url: cover.saveUrl, @@ -814,7 +820,10 @@ delete this.editForm.dragover; fetch("./api/apps", { credentials: 'include', - method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', body: JSON.stringify(this.editForm), }).then((r) => r.json()) .then((r) => { diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index bc495e16..91a64720 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -437,7 +437,10 @@ return fetch("./api/config", { credentials: 'include', - method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', body: JSON.stringify(config), }).then((r) => { if (r.status === 200) { @@ -460,7 +463,7 @@ this.saved = this.restarted = false; }, 5000); fetch("./api/restart", { - method: "POST" + method: 'POST' }) .then((resp) => { if (resp.status !== 200) { diff --git a/src_assets/common/assets/web/login.html b/src_assets/common/assets/web/login.html index 1749dc45..b72f86f3 100644 --- a/src_assets/common/assets/web/login.html +++ b/src_assets/common/assets/web/login.html @@ -89,7 +89,10 @@ localStorage.removeItem('login') } fetch("./api/login", { - method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', body: JSON.stringify(this.passwordData), }).then((res) => { this.loading = false; diff --git a/src_assets/common/assets/web/password.html b/src_assets/common/assets/web/password.html index 64e8fcd5..7fbcf304 100644 --- a/src_assets/common/assets/web/password.html +++ b/src_assets/common/assets/web/password.html @@ -96,7 +96,10 @@ this.error = null; fetch("./api/password", { credentials: 'include', - method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', body: JSON.stringify(this.passwordData), }).then((r) => { if (r.status === 200) { diff --git a/src_assets/common/assets/web/pin.html b/src_assets/common/assets/web/pin.html index d3f50133..dd9755a5 100644 --- a/src_assets/common/assets/web/pin.html +++ b/src_assets/common/assets/web/pin.html @@ -393,7 +393,10 @@ let b = JSON.stringify({pin: pin, name: name}); fetch("./api/pin", { credentials: 'include', - method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', body: b }) .then((response) => response.json()) @@ -537,7 +540,10 @@ } fetch("./api/clients/update", { credentials: 'include', - method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', body: JSON.stringify(editedClient) }) .catch(err => { @@ -583,7 +589,10 @@ disconnectClient(uuid) { fetch("./api/clients/disconnect", { credentials: 'include', - method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', body: JSON.stringify({ uuid }) }).finally(() => { setTimeout(() => { @@ -595,7 +604,7 @@ this.unpairAllPressed = true; fetch("./api/clients/unpair-all", { credentials: 'include', - method: "POST" + method: 'POST' }) .then((r) => r.json()) .then((r) => { @@ -610,7 +619,10 @@ unpairSingle(uuid) { fetch("./api/clients/unpair", { credentials: 'include', - method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', body: JSON.stringify({ uuid }) }).then(() => { this.showApplyMessage = true; diff --git a/src_assets/common/assets/web/troubleshooting.html b/src_assets/common/assets/web/troubleshooting.html index 9c3cb688..2c48de29 100644 --- a/src_assets/common/assets/web/troubleshooting.html +++ b/src_assets/common/assets/web/troubleshooting.html @@ -205,7 +205,7 @@ this.closeAppPressed = true; fetch("./api/apps/close", { credentials: 'include', - method: "POST" + method: 'POST' }) .then((r) => r.json()) .then((r) => { @@ -226,7 +226,7 @@ }, 5000); fetch("./api/restart", { credentials: 'include', - method: "POST", + method: 'POST', }) .then((resp) => { if (resp.status !== 200) { @@ -250,7 +250,7 @@ this.serverQuitting = true; fetch("./api/quit", { credentials: 'include', - method: "POST", + method: 'POST', }) .then(() => { this.serverQuitting = false; @@ -267,7 +267,7 @@ this.ddResetPressed = true; fetch("/api/reset-display-device-persistence", { credentials: 'include', - method: "POST" + method: 'POST' }) .then((r) => r.json()) .then((r) => { diff --git a/src_assets/common/assets/web/welcome.html b/src_assets/common/assets/web/welcome.html index e1775140..08103e34 100644 --- a/src_assets/common/assets/web/welcome.html +++ b/src_assets/common/assets/web/welcome.html @@ -81,7 +81,10 @@ this.error = null; this.loading = true; fetch("./api/password", { - method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', body: JSON.stringify(this.passwordData), }).then((r) => { this.loading = false;