Fix open status

This commit is contained in:
2023-11-07 21:33:44 +00:00
parent 0ab908f79c
commit db275abd0e

View File

@@ -6,8 +6,6 @@ $(document).ready(function () {
if ($('span#hackspace-status').length) {
$.getJSON("https://api.leighhack.org/space.json", function (data) {
var date = new Date(data.state.lastchange * 1000);
if (data.state.open) {
message = '<b>Open<b>'
if ('message' in data.state) {
@@ -16,7 +14,7 @@ $(document).ready(function () {
$('span#hackspace-status').html(message);
$('div#hackspace-open').addClass('is-success');
} else {
$('span#hackspace_status').html('<b>Closed</b>');
$('span#hackspace-status').html('<b>Closed</b>');
}
});
}