change fetch url to troubleshoot error
parent
1bc24c2453
commit
88e517dc23
|
|
@ -303,7 +303,8 @@
|
||||||
|
|
||||||
// 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)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => messageContainer.innerHTML = data.message);
|
.then(data => messageContainer.innerHTML = data.message);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue