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
@@ -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,