mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 05:11:34 +02:00
Merge pull request #4746 from overleaf/ae-project-history
Add endpoint for migrating a project from track-changes to full project history GitOrigin-RevId: 74e1fb1379a78a9569dda2007e677a4d277e38fb
This commit is contained in:
@@ -70,7 +70,15 @@ const ProjectHistoryHandler = {
|
||||
)
|
||||
},
|
||||
|
||||
upgradeHistory(project_id, callback) {
|
||||
unsetHistory(project_id, callback) {
|
||||
return Project.updateOne(
|
||||
{ _id: project_id },
|
||||
{ $unset: { 'overleaf.history': true } },
|
||||
callback
|
||||
)
|
||||
},
|
||||
|
||||
upgradeHistory(project_id, allowDowngrade, callback) {
|
||||
// project must have an overleaf.history.id before allowing display of new history
|
||||
if (callback == null) {
|
||||
callback = function () {}
|
||||
@@ -80,6 +88,7 @@ const ProjectHistoryHandler = {
|
||||
{
|
||||
'overleaf.history.display': true,
|
||||
'overleaf.history.upgradedAt': new Date(),
|
||||
'overleaf.history.allowDowngrade': allowDowngrade,
|
||||
},
|
||||
function (err, result) {
|
||||
if (err != null) {
|
||||
|
||||
Reference in New Issue
Block a user