diff options
author | Adam Hoka | 2018-06-01 13:01:57 +0200 |
---|---|---|
committer | Adam Hoka | 2018-06-01 14:26:28 +0200 |
commit | b5574466cd715f1bfde156d5622e6d03c4f8405f (patch) | |
tree | 2be195445bb6aa44bc9dccc162bdd91d23971d6e /lib/web/imageRouter/s3.js | |
parent | 65544f9a18a2a418cd88d8fc9f8ee227bd4cf03c (diff) |
Fix callback validation
Signed-off-by: Adam Hoka <hoka.adam@nexogen.hu>
Diffstat (limited to '')
-rw-r--r-- | lib/web/imageRouter/s3.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/web/imageRouter/s3.js b/lib/web/imageRouter/s3.js index bcd3ea60..626fe148 100644 --- a/lib/web/imageRouter/s3.js +++ b/lib/web/imageRouter/s3.js @@ -4,6 +4,7 @@ const path = require('path') const config = require('../../config') const {getImageMimeType} = require('../../utils') +const logger = require('../../logger') const AWS = require('aws-sdk') const awsConfig = new AWS.Config(config.s3) @@ -16,7 +17,7 @@ exports.uploadImage = function (imagePath, callback) { } if (!callback || typeof callback !== 'function') { - callback(new Error('Callback has to be a function'), null) + logger.error('Callback has to be a function') return } |