Merge pull request #3298 from overleaf/jpa-re-land-mongoose-latest

[misc] re-land: remove mongojs and bump mongoose

GitOrigin-RevId: 02f78d52ffc2d373c8c0bc4860d3b2326a46f5c9
This commit is contained in:
Jakob Ackermann
2020-11-03 03:04:52 +00:00
committed by Copybot
parent a73df8203e
commit 28fe397f38
60 changed files with 453 additions and 670 deletions
@@ -15,7 +15,7 @@ const ProjectOptionsHandler = {
}
const conditions = { _id: projectId }
const update = { compiler }
Project.update(conditions, update, {}, callback)
Project.updateOne(conditions, update, {}, callback)
},
setImageName(projectId, imageName, callback) {
@@ -31,7 +31,7 @@ const ProjectOptionsHandler = {
}
const conditions = { _id: projectId }
const update = { imageName: settings.imageRoot + '/' + imageName }
Project.update(conditions, update, {}, callback)
Project.updateOne(conditions, update, {}, callback)
},
setSpellCheckLanguage(projectId, languageCode, callback) {
@@ -46,7 +46,7 @@ const ProjectOptionsHandler = {
}
const conditions = { _id: projectId }
const update = { spellCheckLanguage: languageCode }
Project.update(conditions, update, {}, callback)
Project.updateOne(conditions, update, {}, callback)
},
setBrandVariationId(projectId, brandVariationId, callback) {
@@ -55,13 +55,13 @@ const ProjectOptionsHandler = {
}
const conditions = { _id: projectId }
const update = { brandVariationId }
Project.update(conditions, update, {}, callback)
Project.updateOne(conditions, update, {}, callback)
},
unsetBrandVariationId(projectId, callback) {
const conditions = { _id: projectId }
const update = { $unset: { brandVariationId: 1 } }
Project.update(conditions, update, {}, callback)
Project.updateOne(conditions, update, {}, callback)
}
}