Added Image.png for the Wiki
This commit is contained in:
parent
ab74c51295
commit
f44ebd78e0
|
@ -136,7 +136,8 @@ app.get('/api/usercount', function (req, res) {
|
||||||
res.send(usercountanswer);
|
res.send(usercountanswer);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
app.get('/api/simple/image', 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'));
|
res.sendFile(path.resolve(__dirname, 'public/img/green.png'));
|
||||||
} else if (spaceanswer.state.open == false) {
|
} else if (spaceanswer.state.open == false) {
|
||||||
|
@ -144,6 +145,14 @@ app.get('/api/simple/image', function (req, res) {
|
||||||
} else {
|
} else {
|
||||||
res.sendFile(path.resolve(__dirname, 'public/img/yellow.png'));
|
res.sendFile(path.resolve(__dirname, 'public/img/yellow.png'));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
app.get('/api/simple/image', function (req, res) {
|
||||||
|
getstatusImage(req, res);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/api/simple/image.png', function (req, res) {
|
||||||
|
getstatusImage(req, res);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/db', routes.db);
|
app.get('/db', routes.db);
|
||||||
|
|
Loading…
Reference in New Issue