@@ -343,7 +343,7 @@ module.exports = {
}
], (err, station) => {
- if (err) throw err;
+ if (err) {console.log(err); return cb({ 'status': 'failure', 'message': 'Something went wrong.'});}
cache.pub('station.create', data._id);
return cb(null, { 'status': 'success', 'message': 'Successfully created station.' });
});
@@ -41,7 +41,7 @@ module.exports = {
},
], (err, song) => {
- if (err && err !== true) cb(err);
+ if (err && err !== true) return cb(err);
cb(null, song);