Use lean() method on read-only database calls
This commit is contained in:
parent
881dfd34d7
commit
88dd0c6172
3 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ const client = new Twitter({
|
|||
});
|
||||
exports.client = client;
|
||||
exports.active = false;
|
||||
database.tweets.find({ enabled: true }, (error, docs) => {
|
||||
database.tweets.find({ enabled: true }).lean().exec((error, docs) => {
|
||||
if (error) throw error;
|
||||
exports.tweets = docs[0];
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue