mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 17:05:51 +01:00
closes #3664
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var async = require('async'),
|
||||
_ = require('underscore'),
|
||||
|
||||
meta = require('../meta'),
|
||||
db = require('../database'),
|
||||
@@ -91,7 +92,7 @@ module.exports = function(Posts) {
|
||||
});
|
||||
},
|
||||
function(postData, next) {
|
||||
plugins.fireHook('action:post.save', postData);
|
||||
plugins.fireHook('action:post.save', _.clone(postData));
|
||||
next(null, postData);
|
||||
}
|
||||
], callback);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
var async = require('async'),
|
||||
_ = require('underscore'),
|
||||
|
||||
db = require('../database'),
|
||||
topics = require('../topics'),
|
||||
user = require('../user'),
|
||||
@@ -59,7 +61,7 @@ module.exports = function(Posts) {
|
||||
},
|
||||
function(cid, next) {
|
||||
postData.cid = cid;
|
||||
plugins.fireHook('action:post.restore', postData);
|
||||
plugins.fireHook('action:post.restore', _.clone(postData));
|
||||
|
||||
async.parallel([
|
||||
function(next) {
|
||||
|
||||
@@ -32,7 +32,9 @@ module.exports = function(Topics) {
|
||||
db.sortedSetRemove('cid:' + topicData.cid + ':pids', pids, next);
|
||||
});
|
||||
}
|
||||
], callback);
|
||||
], function(err, results) {
|
||||
callback(err);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -77,7 +79,9 @@ module.exports = function(Topics) {
|
||||
});
|
||||
});
|
||||
}
|
||||
], callback);
|
||||
], function(err, results) {
|
||||
callback(err);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ module.exports = function(Topics) {
|
||||
uid: uid
|
||||
};
|
||||
|
||||
callback(null, data);
|
||||
next(null, data);
|
||||
}
|
||||
], callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user