Use lean in more places

This commit is contained in:
Phillip Thelen
2026-01-28 20:56:29 +01:00
parent e1a68cd02a
commit b97dfdfa83
12 changed files with 20 additions and 14 deletions
+1 -1
View File
@@ -406,7 +406,7 @@ api.getUserAnonymized = {
{ type: { $in: ['habit', 'daily', 'reward'] } },
],
};
const tasks = await Tasks.Task.find(query).exec();
const tasks = await Tasks.Task.find(query).lean().exec();
forEach(tasks, task => {
task.text = 'task text';