Merge pull request #11741 from overleaf/tm-fix-foreach-invite-email-lowercase-script

Bugfix for script to fix lowercase emails in group invites

GitOrigin-RevId: f8581376fa5dde2fe057f0e988e5921de7446612
This commit is contained in:
Thomas 2023-02-08 15:36:30 +01:00 committed by Copybot
parent 1073c08c10
commit 6ca86168b1

View file

@ -14,7 +14,7 @@ function anyInviteEmailHasUppercaseChars(subscription) {
}
async function processBatch(_, subscriptions) {
subscriptions.forEach(subscription => {
for (const subscription of subscriptions) {
if (anyInviteEmailHasUppercaseChars(subscription)) {
console.log('fixing emails in group invites for', subscription._id)
if (!DRY_RUN) {
@ -41,7 +41,7 @@ async function processBatch(_, subscriptions) {
])
}
}
})
}
}
async function main() {