Merge pull request #16186 from overleaf/mj-mongo-object-id

[web] Use constructor for ObjectId

GitOrigin-RevId: 9eb8b377ea599605b72af237d1ab12f4d8287162
This commit is contained in:
Mathias Jakobsen
2023-12-19 09:04:02 +00:00
committed by Copybot
parent 0ac514f81b
commit c371732e6e
100 changed files with 423 additions and 368 deletions
+2 -2
View File
@@ -75,8 +75,8 @@ async function processDoc(projectId, docId) {
if (opts.commit) {
const fileRef = await sendDocToFilestore(projectId, doc)
await ProjectEntityMongoUpdateHandler.promises.replaceDocWithFile(
ObjectId(projectId),
ObjectId(docId),
new ObjectId(projectId),
new ObjectId(docId),
fileRef
)
await deleteDocFromMongo(projectId, doc)