mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-16 11:37:37 +01:00
dont do anything if id is falsy
added callback
This commit is contained in:
@@ -41,7 +41,10 @@ module.exports = function(db, module) {
|
||||
|
||||
module.searchRemove = function(key, id, callback) {
|
||||
callback = callback || helpers.noop;
|
||||
db.collection('search').remove({key:key, id:id}, callback);
|
||||
if (!id) {
|
||||
return callback();
|
||||
}
|
||||
db.collection('search').remove({key: key, id: id}, callback);
|
||||
};
|
||||
|
||||
module.flushdb = function(callback) {
|
||||
|
||||
Reference in New Issue
Block a user