Commit ffa6bd1a authored by 陈家荣's avatar 陈家荣

增加逻辑删除service

parent e642fd1a
......@@ -447,6 +447,23 @@ exports.updateThreadById = function(tid, entity, callback) {
}
};
//逻辑删除文章
exports.logicDeleteThreadById = function(tid, callback) {
ForumThread.update({
_id: tid
}, {
status : 3
}, null, function(err, result) {
if (err) {
console.error(err);
callback(err, false);
} else {
callback(null, true);
}
});
};
//根据ID更新文章
exports.deleteThreadById = function(tid, callback) {
ForumThread.remove({
......
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