Commit 9ac63213 authored by 杨翌文's avatar 杨翌文

11

parent 7c541849
......@@ -519,20 +519,16 @@ router.get('/thread/:tid/get', function(req, res, next) {
var tid = req.params.tid || null;
var ent_code = req.session.user.ent_code;
if (tid) {
async.waterfall([
async.waterfall([
function(callback) {
forumThreadService.updateThreadPvCount(tid, function(err, doc) {
forumThreadService.getThreadById(tid, function(err, thread) {
//文章类型 1、文章 2、话题 3、照片墙
if (err) {
callback(err, null);
} else {
callback(null, null);
callback(null, thread);
}
});
},
function(data, callback) {
forumThreadService.getThreadById(tid, function(err, thread) {
//文章类型 1、文章 2、话题 3、照片墙
var info_id = thread.info._id,
pid = thread.pid,
source = req.session.mobileForumUser.source;
......@@ -544,15 +540,12 @@ router.get('/thread/:tid/get', function(req, res, next) {
httpService.createLog(req, source, info_id, 3, 2, tid);
} else if (thread.type == 3 && thread.level == 1) {
httpService.createLog(req, source, info_id, 3, 3, tid);
}
}
});
forumThreadService.updateThreadPvCount(tid, function(err, doc) {
if (err) {
callback(err, null);
} else {
callback(null, thread);
}
console.error(err);
}
});
},
], function(err, thread) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment