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

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

GitOrigin-RevId: eba9f80fbd58dbb8aed131fead3ec0b928a555aa
This commit is contained in:
Jakob Ackermann
2020-11-04 03:04:21 +00:00
committed by Copybot
parent e249a2e5be
commit 87634be542
60 changed files with 453 additions and 670 deletions
@@ -32,13 +32,13 @@ module.exports = {
lastUpdated: lastUpdatedAt || new Date().getTime(),
lastUpdatedBy
}
return Project.update(conditions, update, {}, callback)
return Project.updateOne(conditions, update, {}, callback)
},
markAsOpened(project_id, callback) {
const conditions = { _id: project_id }
const update = { lastOpened: Date.now() }
return Project.update(conditions, update, {}, function(err) {
return Project.updateOne(conditions, update, {}, function(err) {
if (callback != null) {
return callback()
}
@@ -48,7 +48,7 @@ module.exports = {
markAsInactive(project_id, callback) {
const conditions = { _id: project_id }
const update = { active: false }
return Project.update(conditions, update, {}, function(err) {
return Project.updateOne(conditions, update, {}, function(err) {
if (callback != null) {
return callback()
}
@@ -58,7 +58,7 @@ module.exports = {
markAsActive(project_id, callback) {
const conditions = { _id: project_id }
const update = { active: true }
return Project.update(conditions, update, {}, function(err) {
return Project.updateOne(conditions, update, {}, function(err) {
if (callback != null) {
return callback()
}