summaryrefslogtreecommitdiff
path: root/lib/web/imageRouter/azure.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/web/imageRouter/azure.js')
-rw-r--r--lib/web/imageRouter/azure.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/web/imageRouter/azure.js b/lib/web/imageRouter/azure.js
index cc98e5fc..22ee5585 100644
--- a/lib/web/imageRouter/azure.js
+++ b/lib/web/imageRouter/azure.js
@@ -7,13 +7,13 @@ const logger = require('../../logger')
const azure = require('azure-storage')
exports.uploadImage = function (imagePath, callback) {
- if (!imagePath || typeof imagePath !== 'string') {
- callback(new Error('Image path is missing or wrong'), null)
+ if (!callback || typeof callback !== 'function') {
+ logger.error('Callback has to be a function')
return
}
- if (!callback || typeof callback !== 'function') {
- logger.error('Callback has to be a function')
+ if (!imagePath || typeof imagePath !== 'string') {
+ callback(new Error('Image path is missing or wrong'), null)
return
}