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:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user