mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Merge pull request #16186 from overleaf/mj-mongo-object-id
[web] Use constructor for ObjectId GitOrigin-RevId: 9eb8b377ea599605b72af237d1ab12f4d8287162
This commit is contained in:
committed by
Copybot
parent
0ac514f81b
commit
c371732e6e
@@ -8,7 +8,7 @@ const { ObjectId } = require('mongodb')
|
||||
const run = async () => {
|
||||
for (const id of ids) {
|
||||
console.log('id', id)
|
||||
const subscription = await Subscription.findOne({ _id: ObjectId(id) })
|
||||
const subscription = await Subscription.findOne({ _id: new ObjectId(id) })
|
||||
await SubscriptionUpdater.promises.deleteSubscription(
|
||||
subscription,
|
||||
deleterData
|
||||
@@ -33,7 +33,7 @@ const setup = () => {
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
deleterData = { id: ObjectId(deleterId) }
|
||||
deleterData = { id: new ObjectId(deleterId) }
|
||||
}
|
||||
|
||||
setup()
|
||||
|
||||
Reference in New Issue
Block a user