ExportsController.coffee 650 B

12345678910111213141516171819
  1. ExportsHandler = require("./ExportsHandler")
  2. AuthenticationController = require("../Authentication/AuthenticationController")
  3. logger = require("logger-sharelatex")
  4. module.exports =
  5. exportProject: (req, res) ->
  6. {project_id, brand_variation_id} = req.params
  7. user_id = AuthenticationController.getLoggedInUserId(req)
  8. ExportsHandler.exportProject project_id, user_id, brand_variation_id, (err, export_data) ->
  9. return next(err) if err?
  10. logger.log
  11. user_id:user_id
  12. project_id: project_id
  13. brand_variation_id:brand_variation_id
  14. export_v1_id:export_data.v1_id
  15. "exported project"
  16. res.send export_v1_id: export_data.v1_id