mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #931 from sharelatex/hb-s1-ui-form
Send required export fields for s1 submission
This commit is contained in:
commit
a32762bba1
2 changed files with 6 additions and 4 deletions
|
@ -24,7 +24,7 @@ module.exports =
|
||||||
export_params.show_source = req.body.show_source if req.body.show_source
|
export_params.show_source = req.body.show_source if req.body.show_source
|
||||||
|
|
||||||
ExportsHandler.exportProject export_params, (err, export_data) ->
|
ExportsHandler.exportProject export_params, (err, export_data) ->
|
||||||
return next(err) if err?
|
return err if err?
|
||||||
logger.log
|
logger.log
|
||||||
user_id:user_id
|
user_id:user_id
|
||||||
project_id: project_id
|
project_id: project_id
|
||||||
|
@ -36,11 +36,13 @@ module.exports =
|
||||||
exportStatus: (req, res) ->
|
exportStatus: (req, res) ->
|
||||||
{export_id} = req.params
|
{export_id} = req.params
|
||||||
ExportsHandler.fetchExport export_id, (err, export_json) ->
|
ExportsHandler.fetchExport export_id, (err, export_json) ->
|
||||||
return next(err) if err?
|
return err if err?
|
||||||
parsed_export = JSON.parse(export_json)
|
parsed_export = JSON.parse(export_json)
|
||||||
json = {
|
json = {
|
||||||
status_summary: parsed_export.status_summary,
|
status_summary: parsed_export.status_summary,
|
||||||
status_detail: parsed_export.status_detail
|
status_detail: parsed_export.status_detail,
|
||||||
|
partner_submission_id: parsed_export.partner_submission_id,
|
||||||
|
token: parsed_export.token
|
||||||
}
|
}
|
||||||
res.send export_json: json
|
res.send export_json: json
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,6 @@ describe 'ExportsController', ->
|
||||||
@req.params = {project_id: project_id, export_id: 897}
|
@req.params = {project_id: project_id, export_id: 897}
|
||||||
@controller.exportStatus @req, send:(body) =>
|
@controller.exportStatus @req, send:(body) =>
|
||||||
expect(body).to.deep.equal {export_json: {
|
expect(body).to.deep.equal {export_json: {
|
||||||
status_summary: 'completed', status_detail: undefined
|
status_summary: 'completed', status_detail: undefined, partner_submission_id: undefined, token: undefined
|
||||||
}}
|
}}
|
||||||
done()
|
done()
|
||||||
|
|
Loading…
Reference in a new issue