Merge pull request #931 from sharelatex/hb-s1-ui-form

Send required export fields for s1 submission
This commit is contained in:
Hugh O'Brien 2018-09-18 11:21:14 +01:00 committed by GitHub
commit a32762bba1
2 changed files with 6 additions and 4 deletions

View file

@ -24,7 +24,7 @@ module.exports =
export_params.show_source = req.body.show_source if req.body.show_source
ExportsHandler.exportProject export_params, (err, export_data) ->
return next(err) if err?
return err if err?
logger.log
user_id:user_id
project_id: project_id
@ -36,11 +36,13 @@ module.exports =
exportStatus: (req, res) ->
{export_id} = req.params
ExportsHandler.fetchExport export_id, (err, export_json) ->
return next(err) if err?
return err if err?
parsed_export = JSON.parse(export_json)
json = {
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

View file

@ -90,6 +90,6 @@ describe 'ExportsController', ->
@req.params = {project_id: project_id, export_id: 897}
@controller.exportStatus @req, send:(body) =>
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()