Skip to content
Snippets Groups Projects
Commit d8cb9211 authored by aurieh's avatar aurieh
Browse files

Remove things

parent dc0fbe78
No related branches found
No related tags found
No related merge requests found
...@@ -72,8 +72,8 @@ app.use(route.get('/freshclam', require('./routes/freshclam.js'))); ...@@ -72,8 +72,8 @@ app.use(route.get('/freshclam', require('./routes/freshclam.js')));
* Return a 200 OK response, so that Elastic Beanstalk can check if the server * Return a 200 OK response, so that Elastic Beanstalk can check if the server
* is still online. * is still online.
*/ */
app.use(route.get('/health', (req, res, next) => { app.use(route.get('/health', () => {
res.status(200).end(); this.status = 200;
})); }));
// Listen on 8080 // Listen on 8080
......
...@@ -5,16 +5,12 @@ const freshClam = require('../lib/freshclam.js'); ...@@ -5,16 +5,12 @@ const freshClam = require('../lib/freshclam.js');
* > GET /freshclam * > GET /freshclam
* Run freshclam to update the virus database. * Run freshclam to update the virus database.
*/ */
module.exports = function* freshclam(next) { module.exports = function* freshclam() {
freshClam().then(() => { freshClam().then(() => {
this.body = null;
this.status = 200; this.status = 200;
yield;
}).catch(err => { }).catch(err => {
console.error('failed to update virus definitions'); console.error('failed to update virus definitions');
console.error(err); console.error(err);
this.body = null;
this.status = 500; this.status = 500;
yield;
}); });
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment