From c4cae1d083f6c02fbbc40c76ec907274cf67bdff Mon Sep 17 00:00:00 2001
From: aurieh <auriteh@gmail.com>
Date: Wed, 28 Dec 2016 12:46:21 +0200
Subject: [PATCH] Fix devdeps, freshclam

---
 package.json        |  6 +++---
 routes/freshclam.js | 13 ++++---------
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/package.json b/package.json
index 326ab96..d86bdc2 100644
--- a/package.json
+++ b/package.json
@@ -35,9 +35,9 @@
     "express": "^4.14.0"
   },
   "devDependencies": {
-    "eslint": "^3.12.1",
+    "eslint": "^3.12.2",
     "eslint-config-standard": "^6.2.1",
-    "eslint-plugin-promise": "^3.4.0",
-    "eslint-plugin-standard": "^2.0.1"
+    "eslint-plugin-promise": "github:xjamundx/eslint-plugin-promise",
+    "eslint-plugin-standard": "github:xjamundx/eslint-plugin-standard"
   }
 }
diff --git a/routes/freshclam.js b/routes/freshclam.js
index 0208923..b153284 100644
--- a/routes/freshclam.js
+++ b/routes/freshclam.js
@@ -5,12 +5,7 @@ const freshClam = require('../lib/freshclam.js');
  * > GET /freshclam
  * Run freshclam to update the virus database.
  */
-module.exports = function* freshclam() {
-  freshClam().then(() => {
-    this.status = 200;
-  }).catch(err => {
-    console.error('failed to update virus definitions');
-    console.error(err);
-    this.status = 500;
-  });
-}
+module.exports = function* freshclam () {
+  yield freshClam();
+  this.status = 200;
+};
-- 
GitLab