From 7b4bde56c99986ca107f7d6e20cdc6f6c9b725ee Mon Sep 17 00:00:00 2001 From: bill bittner Date: Thu, 13 Jul 2017 00:05:37 -0700 Subject: [PATCH] added missing 'null' in publish postToStats --- routes/sockets-routes.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routes/sockets-routes.js b/routes/sockets-routes.js index bb3d23b3..86ad1f39 100644 --- a/routes/sockets-routes.js +++ b/routes/sockets-routes.js @@ -27,7 +27,7 @@ module.exports = (app, siofu, hostedContentPath) => { // listener for when file upload encounters an error uploader.on('error', ({ error }) => { logger.error('an error occured while uploading', error); - postToStats('publish', '/', null, null, error); + postToStats('publish', '/', null, null, null, error); socket.emit('publish-status', error); }); // listener for when file has been uploaded @@ -41,18 +41,18 @@ module.exports = (app, siofu, hostedContentPath) => { publishController .publish(publishParams, file.name, file.meta.type) .then(result => { - postToStats('publish', '/', null, null, 'success'); + postToStats('publish', '/', null, null, null, 'success'); socket.emit('publish-complete', { name: publishParams.name, result }); }) .catch(error => { error = errorHandlers.handlePublishError(error); - postToStats('publish', '/', null, null, error); + postToStats('publish', '/', null, null, null, error); socket.emit('publish-failure', error); }); } else { logger.error(`An error occurred in uploading the client's file`); socket.emit('publish-failure', 'File uploaded, but with errors'); - postToStats('publish', '/', null, null, 'File uploaded, but with errors'); + postToStats('publish', '/', null, null, null, 'File uploaded, but with errors'); // to-do: remove the file if not done automatically } });