check err and print info

This commit is contained in:
barisusakli
2015-11-25 12:20:37 -05:00
parent d3778a052a
commit 1c71001e1d

View File

@@ -460,10 +460,15 @@ function createWelcomePost(next) {
db.getObjectField('global', 'topicCount', next);
}
], function(err, results) {
if (err) {
return next(err);
}
var content = results[0],
numTopics = results[1];
if (!parseInt(numTopics, 10)) {
process.stdout.write('Creating welcome post!\n');
Topics.post({
uid: 1,
cid: 2,