diff --git a/hmdooris/static/main.js b/hmdooris/static/main.js index 2360f12..fd21872 100644 --- a/hmdooris/static/main.js +++ b/hmdooris/static/main.js @@ -61,9 +61,9 @@ fetch("/api/lock").then((res) => res.json()).then((data) => { - if (!data.authorized) - return; let locks = document.getElementById("locks"); + if (locks === null || !data.authorized) + return; for (let lock of data.locks) { let lock_line = document.createElement("div"); lock_line.id = `lock__line__${lock.id}`; diff --git a/hmdooris/templates/home.html.j2 b/hmdooris/templates/home.html.j2 index ea06382..e3dd21e 100644 --- a/hmdooris/templates/home.html.j2 +++ b/hmdooris/templates/home.html.j2 @@ -2,6 +2,5 @@ {% block page_title %}CCCHH Dooris{% endblock %} {% block page_body %}

Shows the status of the logs

-
Lock or unlock a door {% endblock %}