mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
fixes removePostFromTopic
remove the pid from the votes set too
This commit is contained in:
@@ -131,7 +131,14 @@ module.exports = function(Topics) {
|
||||
};
|
||||
|
||||
Topics.removePostFromTopic = function(tid, pid, callback) {
|
||||
db.sortedSetRemove('tid:' + tid + ':posts', pid, callback);
|
||||
async.parallel([
|
||||
function (next) {
|
||||
db.sortedSetRemove('tid:' + tid + ':posts', pid, next);
|
||||
},
|
||||
function (next) {
|
||||
db.sortedSetRemove('tid:' + tid + ':posts:votes', pid, next);
|
||||
}
|
||||
], callback);
|
||||
};
|
||||
|
||||
Topics.getPids = function(tid, callback) {
|
||||
|
||||
Reference in New Issue
Block a user