mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-05 05:25:49 +01:00
Merge pull request #1664 from char101/patch-6
Fix callback execution in redis search
This commit is contained in:
@@ -27,13 +27,9 @@ module.exports = function(redisClient, module) {
|
||||
|
||||
module.searchRemove = function(key, id, callback) {
|
||||
if(key === 'post') {
|
||||
module.postSearch.remove(id);
|
||||
module.postSearch.remove(id, callback);
|
||||
} else if(key === 'topic') {
|
||||
module.topicSearch.remove(id);
|
||||
}
|
||||
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
module.topicSearch.remove(id, callback);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user