You've already forked crontab-ui
mirror of
https://github.com/alseambusher/crontab-ui.git
synced 2025-12-15 11:43:58 +08:00
Adding a callback for logging error on deleting backup
This commit is contained in:
@@ -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");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user