Added Image.png for the Wiki

This commit is contained in:
Tim Windelschmidt 2016-09-27 21:33:30 +02:00
parent ab74c51295
commit f44ebd78e0
1 changed files with 10 additions and 1 deletions

View File

@ -136,7 +136,8 @@ app.get('/api/usercount', function (req, res) {
res.send(usercountanswer);
});
});
app.get('/api/simple/image', function (req, res) {
function getstatusImage(req, res) {
if (spaceanswer.state.open == true) {
res.sendFile(path.resolve(__dirname, 'public/img/green.png'));
} else if (spaceanswer.state.open == false) {
@ -144,6 +145,14 @@ app.get('/api/simple/image', function (req, res) {
} else {
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);