bug fix
parent
ea7cde069b
commit
ff55c689db
|
|
@ -300,14 +300,13 @@
|
|||
let delay = "";
|
||||
let apiKey = "";
|
||||
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)
|
||||
const unlockDoor = (dID, aK, d) => {
|
||||
//fetch(`${unlockUrl}?deviceID=${dID}&apiKey=${aK}&delay=${d}`)
|
||||
fetch(unlockUrl)
|
||||
.then(response => response.text())
|
||||
.then(data => messageContainer.innerHTML = data);
|
||||
fetch(`${unlockUrl}?deviceID=${dID}&apiKey=${aK}&delay=${d}`)
|
||||
// fetch(unlockUrl)
|
||||
.then(response => response.json())
|
||||
.then(data => messageContainer.innerHTML = data.message);
|
||||
}
|
||||
|
||||
const setSettings = () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue