mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
Add callback to mongo.removeSearch, fixes infinite schema update
This commit is contained in:
@@ -145,11 +145,14 @@
|
||||
});
|
||||
}
|
||||
|
||||
module.searchRemove = function(key, id) {
|
||||
module.searchRemove = function(key, id, callback) {
|
||||
db.collection('search').remove({id:id, key:key}, function(err, result) {
|
||||
if(err) {
|
||||
winston.error('Error removing search ' + err.message);
|
||||
}
|
||||
if (typeof callback === 'function') {
|
||||
callback()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user