Merge pull request #12277 from overleaf/jpa-cleanup-batched-update-interface

[web] simplify interface for custom update function in batchedUpdate

GitOrigin-RevId: a00a24a012db400d4161de0bcefa2681206ab296
This commit is contained in:
Jakob Ackermann
2023-03-23 09:04:29 +00:00
committed by Copybot
parent a140e3dc8c
commit 5d9923ad1b
16 changed files with 27 additions and 25 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ async function main(options) {
await batchedUpdate(
'users',
{ auditLog: { $exists: true } },
async (_, users) => {
async users => {
await processUsersBatch(users, options)
},
{ _id: 1, auditLog: 1 }
@@ -62,7 +62,7 @@ async function main(options) {
await batchedUpdate(
'projects',
{ auditLog: { $exists: true } },
async (x, projects) => {
async projects => {
await processProjectsBatch(projects, options)
},
{ _id: 1, auditLog: 1 }