changes to templates

This commit is contained in:
Baris Soner Usakli
2014-02-25 14:03:47 -05:00
parent 156c0302c9
commit 7e5a7c53bd
8 changed files with 79 additions and 142 deletions

View File

@@ -153,7 +153,11 @@ var winston = require('winston'),
// Delete the thread if it is the last undeleted post
threadTools.getLatestUndeletedPid(postData.tid, function(err, pid) {
if (err && err.message === 'no-undeleted-pids-found') {
if(err) {
return winston.error(err.message);
}
if (!pid) {
threadTools.delete(postData.tid, uid, function(err) {
if (err) {
winston.error('Could not delete topic (tid: ' + postData.tid + ')', err.stack);
@@ -166,7 +170,6 @@ var winston = require('winston'),
}
});
callback(null);
});
};
@@ -182,7 +185,6 @@ var winston = require('winston'),
}
});
});
}
PostTools.restore = function(uid, pid, callback) {