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

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

GitOrigin-RevId: 45a284435c88898d96769ab258651fb8d6d20ff5
This commit is contained in:
Jakob Ackermann
2020-11-02 15:57:41 +01:00
committed by Copybot
parent 6a837ce457
commit e249a2e5be
60 changed files with 671 additions and 454 deletions
@@ -32,13 +32,13 @@ module.exports = {
lastUpdated: lastUpdatedAt || new Date().getTime(),
lastUpdatedBy
}
return Project.updateOne(conditions, update, {}, callback)
return Project.update(conditions, update, {}, callback)
},
markAsOpened(project_id, callback) {
const conditions = { _id: project_id }
const update = { lastOpened: Date.now() }
return Project.updateOne(conditions, update, {}, function(err) {
return Project.update(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.updateOne(conditions, update, {}, function(err) {
return Project.update(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.updateOne(conditions, update, {}, function(err) {
return Project.update(conditions, update, {}, function(err) {
if (callback != null) {
return callback()
}