diff --git a/services/web/app/coffee/Features/Exports/ExportsController.coffee b/services/web/app/coffee/Features/Exports/ExportsController.coffee index 5e76e9a4b8..ea82cf6a04 100644 --- a/services/web/app/coffee/Features/Exports/ExportsController.coffee +++ b/services/web/app/coffee/Features/Exports/ExportsController.coffee @@ -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 diff --git a/services/web/test/unit/coffee/Exports/ExportsControllerTests.coffee b/services/web/test/unit/coffee/Exports/ExportsControllerTests.coffee index 4e96f68926..36ff01c3ef 100644 --- a/services/web/test/unit/coffee/Exports/ExportsControllerTests.coffee +++ b/services/web/test/unit/coffee/Exports/ExportsControllerTests.coffee @@ -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()