ExportsController.coffee 622 B

123456789101112131415161718
  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. logger.log
  10. user_id:user_id
  11. project_id: project_id
  12. brand_variation_id:brand_variation_id
  13. export_v1_id:export_data.v1_id
  14. "exported project"
  15. res.send export_v1_id: export_data.v1_id