mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
check err and print info
This commit is contained in:
@@ -460,10 +460,15 @@ function createWelcomePost(next) {
|
|||||||
db.getObjectField('global', 'topicCount', next);
|
db.getObjectField('global', 'topicCount', next);
|
||||||
}
|
}
|
||||||
], function(err, results) {
|
], function(err, results) {
|
||||||
|
if (err) {
|
||||||
|
return next(err);
|
||||||
|
}
|
||||||
|
|
||||||
var content = results[0],
|
var content = results[0],
|
||||||
numTopics = results[1];
|
numTopics = results[1];
|
||||||
|
|
||||||
if (!parseInt(numTopics, 10)) {
|
if (!parseInt(numTopics, 10)) {
|
||||||
|
process.stdout.write('Creating welcome post!\n');
|
||||||
Topics.post({
|
Topics.post({
|
||||||
uid: 1,
|
uid: 1,
|
||||||
cid: 2,
|
cid: 2,
|
||||||
|
|||||||
Reference in New Issue
Block a user