summaryrefslogtreecommitdiff
path: root/lib/web/imageRouter
diff options
context:
space:
mode:
Diffstat (limited to '')
-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')