master
Bryan 2020-12-20 14:31:50 -06:00
parent 12e64aeff7
commit cd4ff2be15
1 changed files with 2 additions and 1 deletions

View File

@ -24,9 +24,10 @@
const unlockDoor = (e, dID, aK, d) => {
fetch(`${unlockUrl}?deviceID=${dID}&apiKey=${aK}&delay=${d}`)
.then(response => response.json())
.then(data => () {
.then(data => {
setTimeout(function() { messageContainer.innerHTML = "" }, 3000);
messageContainer.innerHTML = data.message;
return;
})
.catch(error => messageContainer.innerHTML = `Error: ${error}`)
}