summaryrefslogtreecommitdiff
path: root/lib/web/imageRouter
diff options
context:
space:
mode:
authorSheogorath2019-05-31 00:27:56 +0200
committerSheogorath2019-05-31 00:30:29 +0200
commit4da68597f701376307fe8849ed57edd3a80833ed (patch)
treefb50db25c63b3b2cb70426ba3eab42007be60134 /lib/web/imageRouter
parent3eca0a74ae3d87a42acb7c7b8e39e2c389e3c96c (diff)
Fix eslint warnings
Since we are about to release it's time to finally fix our linting. This patch basically runs eslint --fix and does some further manual fixes. Also it sets up eslint to fail on every warning on order to make warnings visable in the CI process. There should no functional change be introduced. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to 'lib/web/imageRouter')
-rw-r--r--lib/web/imageRouter/imgur.js16
-rw-r--r--lib/web/imageRouter/minio.js2
-rw-r--r--lib/web/imageRouter/s3.js2
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/web/imageRouter/imgur.js b/lib/web/imageRouter/imgur.js
index 2a20002c..eee349f9 100644
--- a/lib/web/imageRouter/imgur.js
+++ b/lib/web/imageRouter/imgur.js
@@ -17,12 +17,12 @@ exports.uploadImage = function (imagePath, callback) {
imgur.setClientId(config.imgur.clientID)
imgur.uploadFile(imagePath)
- .then(function (json) {
- if (config.debug) {
- logger.info('SERVER uploadimage success: ' + JSON.stringify(json))
- }
- callback(null, json.data.link.replace(/^http:\/\//i, 'https://'))
- }).catch(function (err) {
- callback(new Error(err), null)
- })
+ .then(function (json) {
+ if (config.debug) {
+ logger.info('SERVER uploadimage success: ' + JSON.stringify(json))
+ }
+ callback(null, json.data.link.replace(/^http:\/\//i, 'https://'))
+ }).catch(function (err) {
+ callback(new Error(err), null)
+ })
}
diff --git a/lib/web/imageRouter/minio.js b/lib/web/imageRouter/minio.js
index 1d993a45..fe43f76f 100644
--- a/lib/web/imageRouter/minio.js
+++ b/lib/web/imageRouter/minio.js
@@ -3,7 +3,7 @@ const fs = require('fs')
const path = require('path')
const config = require('../../config')
-const {getImageMimeType} = require('../../utils')
+const { getImageMimeType } = require('../../utils')
const logger = require('../../logger')
const Minio = require('minio')
diff --git a/lib/web/imageRouter/s3.js b/lib/web/imageRouter/s3.js
index 626fe148..b0eca7b5 100644
--- a/lib/web/imageRouter/s3.js
+++ b/lib/web/imageRouter/s3.js
@@ -3,7 +3,7 @@ const fs = require('fs')
const path = require('path')
const config = require('../../config')
-const {getImageMimeType} = require('../../utils')
+const { getImageMimeType } = require('../../utils')
const logger = require('../../logger')
const AWS = require('aws-sdk')