Fix lint errors

This commit is contained in:
Brenton Durkee 2017-10-17 19:16:19 -04:00
parent 0cbec006b4
commit 56fedc6ee9

View file

@ -139,15 +139,16 @@ module.exports.update = (id, updates, callback) => {
});
};
module.exports.duplicate = (id, callback) => {
return this.get(id, (err, template) => {
if (!template) {
return callback(new Error(_('Template does not exist')));
}
template.name = template.name + ' Copy';
return this.create(template, callback);
});
}
module.exports.duplicate = (id, callback) => module.exports.get(id, (err, template) => {
if (err) {
return callback(err);
}
if (!template) {
return callback(new Error(_('Template does not exist')));
}
template.name = template.name + ' Copy';
return module.exports.create(template, callback);
});
module.exports.delete = (id, callback) => {
id = Number(id) || 0;