bug fix
parent
ea7cde069b
commit
ff55c689db
|
|
@ -300,14 +300,13 @@
|
||||||
let delay = "";
|
let delay = "";
|
||||||
let apiKey = "";
|
let apiKey = "";
|
||||||
const unlockUrl = "https://ths.tnet.space/cgi-bin/unlock-main.cgi";
|
const unlockUrl = "https://ths.tnet.space/cgi-bin/unlock-main.cgi";
|
||||||
// const unlockUrl = "https://ths.tnet.space/cgi-bin/doorcontrol-cgi/test.cgi";
|
|
||||||
|
|
||||||
// make fetch function that calls cgi script with attributes (device id, api key, delay)
|
// make fetch function that calls cgi script with attributes (device id, api key, delay)
|
||||||
const unlockDoor = (dID, aK, d) => {
|
const unlockDoor = (dID, aK, d) => {
|
||||||
//fetch(`${unlockUrl}?deviceID=${dID}&apiKey=${aK}&delay=${d}`)
|
fetch(`${unlockUrl}?deviceID=${dID}&apiKey=${aK}&delay=${d}`)
|
||||||
fetch(unlockUrl)
|
// fetch(unlockUrl)
|
||||||
.then(response => response.text())
|
.then(response => response.json())
|
||||||
.then(data => messageContainer.innerHTML = data);
|
.then(data => messageContainer.innerHTML = data.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
const setSettings = () => {
|
const setSettings = () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue