mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 01:15:47 +01:00
convert min/max to float
This commit is contained in:
@@ -41,11 +41,11 @@ module.exports = function (db, module) {
|
||||
var query = { _key: { $in: keys } };
|
||||
|
||||
if (min !== '-inf') {
|
||||
query.score = { $gte: min };
|
||||
query.score = { $gte: parseFloat(min) };
|
||||
}
|
||||
if (max !== '+inf') {
|
||||
query.score = query.score || {};
|
||||
query.score.$lte = max;
|
||||
query.score.$lte = parseFloat(max);
|
||||
}
|
||||
|
||||
db.collection('objects').remove(query, function (err) {
|
||||
@@ -53,3 +53,5 @@ module.exports = function (db, module) {
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user