mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	delete topic post sorted sets on topic purge
This commit is contained in:
		@@ -218,14 +218,7 @@ module.exports = function(Topics) {
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	Topics.removePostFromTopic = function(tid, pid, callback) {
 | 
			
		||||
		async.parallel([
 | 
			
		||||
			function (next) {
 | 
			
		||||
				db.sortedSetRemove('tid:' + tid + ':posts', pid, next);
 | 
			
		||||
			},
 | 
			
		||||
			function (next) {
 | 
			
		||||
				db.sortedSetRemove('tid:' + tid + ':posts:votes', pid, next);
 | 
			
		||||
			}
 | 
			
		||||
		], function(err, results) {
 | 
			
		||||
		db.sortedSetsRemove(['tid:' + tid + ':posts', 'tid:' + tid + ':posts:votes'], pid, function(err) {
 | 
			
		||||
			if (err) {
 | 
			
		||||
				return callback(err);
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user