fix the download and compile endpoint used by zip

This commit is contained in:
Henry Oswald 2016-06-15 14:45:05 +01:00
parent 46374f39ff
commit 8a9a65a80a
2 changed files with 3 additions and 3 deletions

View file

@ -101,7 +101,7 @@ module.exports = CompileController =
logger.err err:err, project_id:project_id, "something went wrong compile and downloading pdf" logger.err err:err, project_id:project_id, "something went wrong compile and downloading pdf"
res.sendStatus 500 res.sendStatus 500
url = "/project/#{project_id}/output/output.pdf" url = "/project/#{project_id}/output/output.pdf"
CompileController.proxyToClsi project_id, user_id, url, req, res, next CompileController.proxyToClsi project_id, url, req, res, next
getFileFromClsi: (req, res, next = (error) ->) -> getFileFromClsi: (req, res, next = (error) ->) ->
project_id = req.params.Project_id project_id = req.params.Project_id

View file

@ -352,9 +352,9 @@ describe "CompileController", ->
it "should proxy the res to the clsi with correct url", (done)-> it "should proxy the res to the clsi with correct url", (done)->
@CompileController.compileAndDownloadPdf @req, @res @CompileController.compileAndDownloadPdf @req, @res
sinon.assert.calledWith @CompileController.proxyToClsi, @project_id, @user_id, "/project/#{@project_id}/output/output.pdf", @req, @res sinon.assert.calledWith @CompileController.proxyToClsi, @project_id, "/project/#{@project_id}/output/output.pdf", @req, @res
@CompileController.proxyToClsi.calledWith(@project_id, @user_id, "/project/#{@project_id}/output/output.pdf", @req, @res).should.equal true @CompileController.proxyToClsi.calledWith(@project_id, "/project/#{@project_id}/output/output.pdf", @req, @res).should.equal true
done() done()
describe "wordCount", -> describe "wordCount", ->