mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
ESlint object-curly-spacing
This commit is contained in:
@@ -7,9 +7,9 @@ module.exports = function (db, module) {
|
||||
}
|
||||
|
||||
var pipeline = [
|
||||
{ $match: { _key: {$in: keys}} },
|
||||
{ $group: { _id: {value: '$value'}, count: {$sum: 1}} },
|
||||
{ $match: { count: keys.length} },
|
||||
{ $match: { _key: { $in: keys } } },
|
||||
{ $group: { _id: { value: '$value' }, count: { $sum: 1 } } },
|
||||
{ $match: { count: keys.length } },
|
||||
{ $group: { _id: null, count: { $sum: 1 } } },
|
||||
];
|
||||
|
||||
@@ -47,7 +47,7 @@ module.exports = function (db, module) {
|
||||
limit = 0;
|
||||
}
|
||||
|
||||
var pipeline = [{ $match: { _key: {$in: sets}} }];
|
||||
var pipeline = [{ $match: { _key: { $in: sets } } }];
|
||||
|
||||
weights.forEach(function (weight, index) {
|
||||
if (weight !== 1) {
|
||||
@@ -70,9 +70,9 @@ module.exports = function (db, module) {
|
||||
}
|
||||
});
|
||||
|
||||
pipeline.push({ $group: { _id: {value: '$value'}, totalScore: aggregate, count: {$sum: 1}} });
|
||||
pipeline.push({ $match: { count: sets.length} });
|
||||
pipeline.push({ $sort: { totalScore: params.sort} });
|
||||
pipeline.push({ $group: { _id: { value: '$value' }, totalScore: aggregate, count: { $sum: 1 } } });
|
||||
pipeline.push({ $match: { count: sets.length } });
|
||||
pipeline.push({ $sort: { totalScore: params.sort } });
|
||||
|
||||
if (start) {
|
||||
pipeline.push({ $skip: start });
|
||||
@@ -82,7 +82,7 @@ module.exports = function (db, module) {
|
||||
pipeline.push({ $limit: limit });
|
||||
}
|
||||
|
||||
var project = { _id: 0, value: '$_id.value'};
|
||||
var project = { _id: 0, value: '$_id.value' };
|
||||
if (params.withScores) {
|
||||
project.score = '$totalScore';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user