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:
@@ -31,7 +31,7 @@ const ProjectHistoryHandler = {
|
||||
return callback(new Error('invalid history id'))
|
||||
}
|
||||
// use $exists:false to prevent overwriting any existing history id, atomically
|
||||
return Project.update(
|
||||
return Project.updateOne(
|
||||
{ _id: project_id, 'overleaf.history.id': { $exists: false } },
|
||||
{ 'overleaf.history.id': history_id },
|
||||
function(err, result) {
|
||||
@@ -72,7 +72,7 @@ const ProjectHistoryHandler = {
|
||||
if (callback == null) {
|
||||
callback = function(err, result) {}
|
||||
}
|
||||
return Project.update(
|
||||
return Project.updateOne(
|
||||
{ _id: project_id, 'overleaf.history.id': { $exists: true } },
|
||||
{
|
||||
'overleaf.history.display': true,
|
||||
@@ -95,7 +95,7 @@ const ProjectHistoryHandler = {
|
||||
if (callback == null) {
|
||||
callback = function(err, result) {}
|
||||
}
|
||||
return Project.update(
|
||||
return Project.updateOne(
|
||||
{ _id: project_id, 'overleaf.history.upgradedAt': { $exists: true } },
|
||||
{
|
||||
'overleaf.history.display': false,
|
||||
|
||||
Reference in New Issue
Block a user