webui/index.html: Fix: remove debug prints
Signed-off-by: Thomas Klaehn <tkl@blackfinn.de>
This commit is contained in:
@@ -119,13 +119,11 @@
|
|||||||
|
|
||||||
function check(checkbox, name) {
|
function check(checkbox, name) {
|
||||||
var obj;
|
var obj;
|
||||||
console.log("name: ", name);
|
|
||||||
if(checkbox.checked) {
|
if(checkbox.checked) {
|
||||||
obj = '{"name":"' + name + '","state":"on"}'
|
obj = '{"name":"' + name + '","state":"on"}'
|
||||||
} else {
|
} else {
|
||||||
obj = '{"name":"' + name + '","state":"off"}'
|
obj = '{"name":"' + name + '","state":"off"}'
|
||||||
}
|
}
|
||||||
console.log(obj);
|
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open("PATCH", "/state");
|
xhr.open("PATCH", "/state");
|
||||||
xhr.setRequestHeader("Content-type", "application/json; charset=utf-8");
|
xhr.setRequestHeader("Content-type", "application/json; charset=utf-8");
|
||||||
|
Reference in New Issue
Block a user