fixed statusbot.js if syntax, added console log for flukso
This commit is contained in:
parent
1b29aa6044
commit
3dd8b88f72
|
@ -79,6 +79,7 @@ ippoll.on('doneState', function (state) {
|
|||
simpleanswer.lastchange = spaceanswer.state.lastchange;
|
||||
simpleanswer.lastchange = new Date().getTime();
|
||||
io.sockets.emit('sdata', {data: simpleanswer});
|
||||
console.log("room state changed: " + JSON.stringify(simpleanswer))
|
||||
});
|
||||
|
||||
flukso.on('done', function (num) {
|
||||
|
@ -139,9 +140,9 @@ app.get('/api/simple/v2', function (req, res) {
|
|||
|
||||
|
||||
function getstatusImage(req, res) {
|
||||
if (spaceanswer.state.open == true) {
|
||||
if (spaceanswer.state.open === true) {
|
||||
res.sendFile(path.resolve(__dirname, 'public/img/green.png'));
|
||||
} else if (spaceanswer.state.open == false) {
|
||||
} else if (spaceanswer.state.open === false) {
|
||||
res.sendFile(path.resolve(__dirname, 'public/img/red.png'));
|
||||
} else {
|
||||
res.sendFile(path.resolve(__dirname, 'public/img/yellow.png'));
|
||||
|
|
Loading…
Reference in New Issue