Adding a callback for logging error on deleting backup

pull/107/head^2
alse 5 years ago
parent b24f4db688
commit 08360cd91b

@ -14,5 +14,12 @@ exports.crontabs = function(db_name, callback){
};
exports.delete = function(db_name){
fs.unlink(__dirname + '/crontabs/' + db_name);
fs.unlink(__dirname + '/crontabs/' + db_name, function(err){
if(err) {
return console.log("Delete error: " + err);
}
else{
console.log("Backup deleted");
}
});
};

Loading…
Cancel
Save