Skip to content

Commit c865753

Browse files
committed
[fix] fixed a fe issues with error loging
1 parent 3f0dbdf commit c865753

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ app.commands.repo = function repo(link, cb) {
7474

7575
app.commands.delrepo = function delRepo(repo, cb) {
7676
this.log.info('Attempting to open delete "' + username + '/' + repo + '"');
77-
deleteRepo(repo, 'OK', cb);
77+
deleteRepo(repo, 'DONE', cb);
7878
};
7979

8080
app.commands.db = function db(cb) {
@@ -245,7 +245,7 @@ function forkAndFix(link, cb) {
245245
function (status, callback) {
246246
submitPullRequest(link, username, user, repo, status, callback);
247247
},// submit pull request
248-
function (repo, status, callback) {
248+
function (status, callback) {
249249
deleteRepo(repo, status, callback);
250250
},// delete forked repo if there is not a pull request to make
251251
function (status, callback) {
@@ -623,14 +623,14 @@ function deleteRepo(repo, status, cb) {
623623
client.del(endpoint, {}, function (err, status, body) {
624624
if (err) {
625625
app.log.error('Could not delete ' + endpoint.blue + ' : ' + body);
626-
//return cb({message: err + ' ' + endpoint});
626+
return cb({message: err + ' ' + endpoint});
627627
}
628628
if (status === 204) { //Status: 204 No Content
629629
app.log.info('Succesfully deleted ' + endpoint.blue);
630630
return cb(null, 'OK');
631631
} else {
632632
app.log.error('Could not delete ' + endpoint.blue + ' : ' + body);
633-
return cb({message: endpoint + ' ' + body});
633+
return cb(null, {message: endpoint + ' ' + body});
634634
}
635635
});
636636
} else {

0 commit comments

Comments
 (0)