Commit 9172e7e9 authored by 陈志良's avatar 陈志良

1

parent 717640fb
This diff is collapsed.
...@@ -289,3 +289,15 @@ exports.getCommentParent = function(cid,callback){ ...@@ -289,3 +289,15 @@ exports.getCommentParent = function(cid,callback){
callback(err,doc); callback(err,doc);
}); });
}; };
//根据ID获取评论
exports.getPopulateCommentById=function(cid,callback){
ForumComment.findById({_id:cid}).populate({path:'from to', select:'uid nickName icon'}).exec(function(err,c){
if (err) {
console.error(err);
callback(null, null);
} else{
callback(null ,c);
}
});
};
\ No newline at end of file
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