Commit f44ebd78 authored by fionera's avatar fionera

Added Image.png for the Wiki

parent ab74c512
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment