Merge pull request #3277 from overleaf/revert-3257-jpa-mongoose-latest

Revert "[misc] upgrade mongoose to the latest version"

GitOrigin-RevId: d5957fca68be65a08a687476742ffbb9c3cb86e8
This commit is contained in:
Simon Detheridge
2020-10-12 13:35:50 +01:00
committed by Copybot
parent dba5127856
commit c257b9695a
59 changed files with 655 additions and 445 deletions
@@ -15,7 +15,7 @@ const ProjectOptionsHandler = {
}
const conditions = { _id: projectId }
const update = { compiler }
Project.updateOne(conditions, update, {}, callback)
Project.update(conditions, update, {}, callback)
},
setImageName(projectId, imageName, callback) {
@@ -31,7 +31,7 @@ const ProjectOptionsHandler = {
}
const conditions = { _id: projectId }
const update = { imageName: settings.imageRoot + '/' + imageName }
Project.updateOne(conditions, update, {}, callback)
Project.update(conditions, update, {}, callback)
},
setSpellCheckLanguage(projectId, languageCode, callback) {
@@ -46,7 +46,7 @@ const ProjectOptionsHandler = {
}
const conditions = { _id: projectId }
const update = { spellCheckLanguage: languageCode }
Project.updateOne(conditions, update, {}, callback)
Project.update(conditions, update, {}, callback)
},
setBrandVariationId(projectId, brandVariationId, callback) {
@@ -55,13 +55,13 @@ const ProjectOptionsHandler = {
}
const conditions = { _id: projectId }
const update = { brandVariationId }
Project.updateOne(conditions, update, {}, callback)
Project.update(conditions, update, {}, callback)
},
unsetBrandVariationId(projectId, callback) {
const conditions = { _id: projectId }
const update = { $unset: { brandVariationId: 1 } }
Project.updateOne(conditions, update, {}, callback)
Project.update(conditions, update, {}, callback)
}
}