mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-08-26 20:17:18 +02:00
dont do anything if id is falsy
added callback
This commit is contained in:
@@ -26,7 +26,12 @@ module.exports = function(redisClient, module) {
|
||||
};
|
||||
|
||||
module.searchRemove = function(key, id, callback) {
|
||||
if(key === 'post') {
|
||||
callback = callback || function() {};
|
||||
if (!id) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
if (key === 'post') {
|
||||
module.postSearch.remove(id, callback);
|
||||
} else if(key === 'topic') {
|
||||
module.topicSearch.remove(id, callback);
|
||||
|
||||
Reference in New Issue
Block a user