Use POST to update instances
This commit is contained in:
1 parent
16797a5144
commit
58ce258509
4 files changed
+22
-12
No files matched your search
+8
-3
@@ -210,9 +210,14 @@ ${JSON.stringify(window.appState.device, null, 2)}
|
||||
.filter(a => !!a)
|
||||
.map(a => a.innerText);
|
||||
|
||||
args = instances.map(instance => `instances=${instance}`).join("&")
|
||||
|
||||
fetch(`/invidious/set-instances?${args}`)
|
||||
fetch('/invidious/instances',
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
method: "POST",
|
||||
body: JSON.stringify(instances)
|
||||
})
|
||||
.then(function (response) {
|
||||
alert("Instances updated. Restart Playlet to reflect changes.")
|
||||
window.location.reload();
|
||||
|
||||
Reference in new issue
Block a user