Fix API requests content type
This commit is contained in:
@@ -735,6 +735,9 @@
|
||||
this.actionDisabled = true;
|
||||
fetch("./api/apps/close", {
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
method: 'POST',
|
||||
})
|
||||
.then((r) => r.json())
|
||||
|
||||
@@ -475,7 +475,10 @@
|
||||
this.saved = this.restarted = false;
|
||||
}, 5000);
|
||||
fetch("./api/restart", {
|
||||
method: 'POST'
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
.then((resp) => {
|
||||
if (resp.status !== 200) {
|
||||
|
||||
@@ -655,7 +655,10 @@
|
||||
this.unpairAllPressed = true;
|
||||
fetch("./api/clients/unpair-all", {
|
||||
credentials: 'include',
|
||||
method: 'POST'
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then((r) => r.json())
|
||||
.then((r) => {
|
||||
|
||||
Reference in New Issue
Block a user