change some variable names
parent
f8197e8eb0
commit
2305a0f35c
|
|
@ -296,14 +296,14 @@
|
|||
const apiKeyInput = document.querySelector("#api-key");
|
||||
|
||||
const showDelay = document.querySelector("#show-delay");
|
||||
let deviceID = "";
|
||||
global deviceID = "";
|
||||
let delay = "";
|
||||
let apiKey = "";
|
||||
const unlockUrl = "https://ths.tnet.space/cgi-bin/doorcontrol-cgi/unlock-main.cgi";
|
||||
|
||||
// make fetch function that calls cgi script with attributes (device id, api key, delay)
|
||||
const unlockDoor = (deviceID, apiKey, delay) => {
|
||||
fetch(`${unlockUrl}?deviceID=${deviceID}&apiKey=${apiKey}&delay=${delay}`)
|
||||
const unlockDoor = (dID, aK, d) => {
|
||||
fetch(`${unlockUrl}?deviceID=${dID}&apiKey=${aK}&delay=${d}`)
|
||||
.then(response => response.json())
|
||||
.then(data => messageContainer.innerHTML = data.message);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue