mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 02:36:16 +01:00
topics data refactor
This commit is contained in:
@@ -108,7 +108,11 @@ module.exports = function (db, module) {
|
||||
return getFromCache();
|
||||
}
|
||||
|
||||
db.collection('objects').find({ _key: { $in: nonCachedKeys } }, { projection: { _id: 0 } }).toArray(function (err, data) {
|
||||
var query = { _key: { $in: nonCachedKeys } };
|
||||
if (nonCachedKeys.length === 1) {
|
||||
query._key = nonCachedKeys[0];
|
||||
}
|
||||
db.collection('objects').find(query, { projection: { _id: 0 } }).toArray(function (err, data) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user