Commit 2f39ffa0 authored by 陈家荣's avatar 陈家荣

aaa

parent 8bbea139
......@@ -328,11 +328,11 @@ router.post('/thread/comment/update/:cid', function(req, res, next) {
// var commentList = result.comments;
// result.comments = forumThreadService.remove(commentList, cid);
// var commentList = result.comments;
// var comments = forumThreadService.remove(commentList, cid);
var commentList = result.comments;
var comments = forumThreadService.remove(commentList, cid);
forumThreadService.updateThreadById(tid, {
"$pull" : { "comments" : { "_id" : cid}},
comments : comments,
$inc: { comment_count: -1 }
}, function(err, result) {
if (err) {
......@@ -363,12 +363,7 @@ router.post('/thread/comment/update/:cid', function(req, res, next) {
var commentList = result.comments;
var comments = forumCommentService.remove(commentList, cid);
forumCommentService.updateCommentById(parent_cid, {
"$pull": {
"comments": {
"_id": cid
}
}
comments : comments,
}, function(err, result) {
if (err) {
res.json(returnCode.BUSY);
......
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