mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Include project's v1 ID in export requests
If a project was imported from v1, include its v1 ID when making an export request back to v1. Use case: v1 project exported via ScholarOne and then migrated to v2 needs to be linked up to its earlier v1 export records.
This commit is contained in:
parent
09c2034c97
commit
8436b67260
2 changed files with 5 additions and 1 deletions
|
@ -56,6 +56,7 @@ module.exports = ExportsHandler = self =
|
|||
rootDocPath: rootDoc[1]?.fileSystem
|
||||
historyId: project.overleaf?.history?.id
|
||||
historyVersion: historyVersion
|
||||
v1ProjectId: project.overleaf?.id
|
||||
user:
|
||||
id: user_id
|
||||
firstName: user.first_name
|
||||
|
|
|
@ -64,6 +64,7 @@ describe 'ExportsHandler', ->
|
|||
@project =
|
||||
id: @project_id
|
||||
overleaf:
|
||||
id: @project_history_id # for projects imported from v1
|
||||
history:
|
||||
id: @project_history_id
|
||||
@user =
|
||||
|
@ -90,12 +91,13 @@ describe 'ExportsHandler', ->
|
|||
.should.equal true
|
||||
|
||||
it "should return export data", ->
|
||||
expected_export_data =
|
||||
expected_export_data =
|
||||
project:
|
||||
id: @project_id
|
||||
rootDocPath: @rootDocPath
|
||||
historyId: @project_history_id
|
||||
historyVersion: @historyVersion
|
||||
v1ProjectId: @project_history_id
|
||||
user:
|
||||
id: @user_id
|
||||
firstName: @user.first_name
|
||||
|
@ -126,6 +128,7 @@ describe 'ExportsHandler', ->
|
|||
rootDocPath: @rootDocPath
|
||||
historyId: @project_history_id
|
||||
historyVersion: @historyVersion
|
||||
v1ProjectId: @project_history_id
|
||||
user:
|
||||
id: @user_id
|
||||
firstName: @custom_first_name
|
||||
|
|
Loading…
Reference in a new issue