From 9f174cb8e3eb1f19a51921c8b09dcd18055845ba Mon Sep 17 00:00:00 2001 From: Tim Windelschmidt Date: Fri, 8 Jan 2016 18:14:07 +0100 Subject: [PATCH] Removed deprecated Thingi and changed folder of views --- node/routes/index.js | 1 - node/statusbot.js | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/node/routes/index.js b/node/routes/index.js index 25bfe09..0af143a 100755 --- a/node/routes/index.js +++ b/node/routes/index.js @@ -1,4 +1,3 @@ - exports.index = function (req, res) { res.render('index', { title: 'Home' }) }; diff --git a/node/statusbot.js b/node/statusbot.js index 30065a8..f204d2d 100755 --- a/node/statusbot.js +++ b/node/statusbot.js @@ -112,7 +112,7 @@ app.use(bodyParser.json({ extended: true })); app.use(cookieSession({secret: 'steam-stalker', cookie: {maxAge: 60000}})); app.use(flash()); -app.set(__dirname + '/views'); +app.set(path.resolve(__dirname + '/views')); app.set('view engine', 'jade'); app.disable('x-powered-by'); app.enable('trust proxy'); @@ -138,11 +138,11 @@ app.get('/api/usercount', function (req, res) { }); app.get('/api/simple/image', function (req, res) { 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) { - res.sendfile(path.resolve(__dirname, 'public/img/red.png')); + res.sendFile(path.resolve(__dirname, 'public/img/red.png')); } else { - res.sendfile(path.resolve(__dirname, 'public/img/yellow.png')); + res.sendFile(path.resolve(__dirname, 'public/img/yellow.png')); } });