mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-08 19:50:47 +00:00
Also include user's v1 ID in export requests
This commit is contained in:
parent
8436b67260
commit
235534d269
2 changed files with 6 additions and 1 deletions
|
@ -31,7 +31,7 @@ module.exports = ExportsHandler = self =
|
|||
ProjectLocator.findRootDoc {project: results.project, project_id: project_id}, cb
|
||||
]
|
||||
user: (cb) ->
|
||||
UserGetter.getUser user_id, {first_name: 1, last_name: 1, email: 1}, cb
|
||||
UserGetter.getUser user_id, {first_name: 1, last_name: 1, email: 1, overleaf: 1}, cb
|
||||
historyVersion: (cb) ->
|
||||
self._requestVersion project_id, cb
|
||||
|
||||
|
@ -63,6 +63,7 @@ module.exports = ExportsHandler = self =
|
|||
lastName: user.last_name
|
||||
email: user.email
|
||||
orcidId: null # until v2 gets ORCID
|
||||
v1UserId: user.overleaf?.id
|
||||
destination:
|
||||
brandVariationId: brand_variation_id
|
||||
options:
|
||||
|
|
|
@ -72,6 +72,8 @@ describe 'ExportsHandler', ->
|
|||
first_name: 'Arthur'
|
||||
last_name: 'Author'
|
||||
email: 'arthur.author@arthurauthoring.org'
|
||||
overleaf:
|
||||
id: 876
|
||||
@rootDocPath = 'main.tex'
|
||||
@historyVersion = 777
|
||||
@ProjectGetter.getProject = sinon.stub().yields(null, @project)
|
||||
|
@ -104,6 +106,7 @@ describe 'ExportsHandler', ->
|
|||
lastName: @user.last_name
|
||||
email: @user.email
|
||||
orcidId: null
|
||||
v1UserId: 876
|
||||
destination:
|
||||
brandVariationId: @brand_variation_id
|
||||
options:
|
||||
|
@ -135,6 +138,7 @@ describe 'ExportsHandler', ->
|
|||
lastName: @custom_last_name
|
||||
email: @user.email
|
||||
orcidId: null
|
||||
v1UserId: 876
|
||||
destination:
|
||||
brandVariationId: @brand_variation_id
|
||||
options:
|
||||
|
|
Loading…
Add table
Reference in a new issue