This commit is contained in:
barisusakli
2016-10-31 22:39:58 +03:00
parent 8f76ebf972
commit 218a1b7aab
2 changed files with 6 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ module.exports = function (Posts) {
plugins.fireHook('filter:post.delete', {pid: pid, uid: uid}, next);
},
function (data, next) {
Posts.setPostField(pid, 'deleted', 1, next);
Posts.setPostFields(pid, {deleted: 1, deleterUid: uid}, next);
},
function (next) {
Posts.getPostFields(pid, ['pid', 'tid', 'uid', 'timestamp'], next);
@@ -53,7 +53,7 @@ module.exports = function (Posts) {
plugins.fireHook('filter:post.restore', {pid: pid, uid: uid}, next);
},
function (data, next) {
Posts.setPostField(pid, 'deleted', 0, next);
Posts.setPostFields(pid, {deleted: 0, deleterUid: 0}, next);
},
function (next) {
Posts.getPostFields(pid, ['pid', 'tid', 'uid', 'content', 'timestamp'], next);