mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #1875 from overleaf/sk-fix-multi-script
Fix the password-removal script, pass the `multi` flag to update GitOrigin-RevId: 753f0911304cfe02e97e03e2e018a826c176e780
This commit is contained in:
parent
4b0a445337
commit
7e1b4195c5
1 changed files with 11 additions and 6 deletions
|
@ -18,13 +18,18 @@ function main(callback) {
|
|||
if (!commit) {
|
||||
return callback()
|
||||
}
|
||||
db.users.update(query, { $unset: { hashedPassword: 1 } }, (err, result) => {
|
||||
db.users.update(
|
||||
query,
|
||||
{ $unset: { hashedPassword: 1 } },
|
||||
{ multi: true },
|
||||
(err, result) => {
|
||||
if (err) {
|
||||
return callback(err)
|
||||
}
|
||||
console.log(`>> Updated users: ${JSON.stringify(result)}`)
|
||||
return callback()
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue