success callback without err

This commit is contained in:
Simon Martín 2018-08-01 16:02:53 +02:00
parent 3bb4ad86ff
commit efafd4cb3e

View File

@ -184,7 +184,7 @@ TemplateMaps.prototype._checkUserTemplatesLimit = function(userTemplatesKey, own
const limit = this._userTemplateLimit();
if(!limit) {
return callback(null);
return callback();
}
this._redisCmd('HLEN', [userTemplatesKey], (err, numberOfTemplates) => {
@ -200,7 +200,7 @@ TemplateMaps.prototype._checkUserTemplatesLimit = function(userTemplatesKey, own
return callback(limitReachedError);
}
return callback(null);
return callback();
});
};
@ -251,7 +251,7 @@ TemplateMaps.prototype.addTemplate = function(owner, template, callback) {
}
this.emit('add', owner, template.name, template);
callback(err, template.name, template);
callback(null, template.name, template);
});
});
};
@ -346,7 +346,7 @@ TemplateMaps.prototype.updTemplate = function(owner, tpl_id, template, callback)
this.emit('update', owner, template.name, template);
}
return callback(err, template);
return callback(null, template);
});
});
};