Merge pull request #12932 from overleaf/em-history-chunks-project-deletion

Use index when deleting project history chunks

GitOrigin-RevId: 804b8fe8da8bab04a4c0e9fe0008c5554b51817e
This commit is contained in:
Eric Mc Sween 2023-05-04 07:29:58 -04:00 committed by Copybot
parent a0e3379c86
commit e323a22666

View file

@ -189,7 +189,7 @@ async function deleteProjectChunks(projectId) {
assert.mongoId(projectId, 'bad projectId') assert.mongoId(projectId, 'bad projectId')
await mongodb.chunks.updateMany( await mongodb.chunks.updateMany(
{ projectId: ObjectId(projectId) }, { projectId: ObjectId(projectId), state: 'active' },
{ $set: { state: 'deleted', updatedAt: new Date() } } { $set: { state: 'deleted', updatedAt: new Date() } }
) )
} }