From b5574466cd715f1bfde156d5622e6d03c4f8405f Mon Sep 17 00:00:00 2001 From: Adam Hoka Date: Fri, 1 Jun 2018 13:01:57 +0200 Subject: Fix callback validation Signed-off-by: Adam Hoka --- lib/web/imageRouter/s3.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/web/imageRouter/s3.js') 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 } -- cgit v1.2.3