Commit 045d3c41 authored by 陈家荣's avatar 陈家荣

fix社区文章加精未赠送积分

parent e8847ebd
......@@ -326,7 +326,8 @@ router.post('/thread/:tid/:fid/recommend', function(req, res, next) {
var tid = req.params.tid,
fid = req.params.fid,
ent_code = req.session.user.ent_code,
mid = req.body.mid; //板块ID
thread_from_id = req.body.thread_from_id;
mid = req.body.mid;
if (tid && fid) {
forumThreadService.updateRecommendByThreadId(tid, function(err, thread) {
if (err) {
......@@ -334,19 +335,24 @@ router.post('/thread/:tid/:fid/recommend', function(req, res, next) {
res.json(returnCode.BUSY);
} else {
if (mid) {
forumLimitOperationService.checkLimitOperationProhibitionAddIntegral(tid, function(err, flag) {
if (err) {
console.error(err);
res.json(returnCode.PROHIBITION_OF_SPEECH);
} else {
if (flag) {
if(thread_from_id){
forumLimitOperationService.checkLimitOperationProhibitionAddIntegral(thread_from_id, function(err, flag) {
if (err) {
console.error(err);
res.json(returnCode.PROHIBITION_OF_SPEECH);
} else {
httpService.sendRequest(ent_code, mid, 'thread_recomment');
res.json(returnCode.SUCCESS);
if (flag) {
res.json(returnCode.PROHIBITION_OF_SPEECH);
} else {
httpService.sendRequest(ent_code, mid, 'thread_recomment');
res.json(returnCode.SUCCESS);
}
}
}
});
});
}else{
httpService.sendRequest(ent_code, mid, 'thread_recomment');
res.json(returnCode.SUCCESS);
}
} else {
res.json(returnCode.SUCCESS);
}
......
This diff is collapsed.
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