add comments to router, downcase route

express has case-insensitive routes
This commit is contained in:
Brian Gough 2016-06-16 13:59:56 +01:00
parent 6873c1d972
commit 8a0fa1321d

View file

@ -106,7 +106,9 @@ module.exports = class Router
webRouter.post '/project/:Project_id/settings/admin', AuthorizationMiddlewear.ensureUserCanAdminProject, ProjectController.updateProjectAdminSettings
webRouter.post '/project/:Project_id/compile', AuthorizationMiddlewear.ensureUserCanReadProject, CompileController.compile
webRouter.get '/Project/:Project_id/output/output.pdf', AuthorizationMiddlewear.ensureUserCanReadProject, CompileController.downloadPdf
# Used by the web download buttons, adds filename header
webRouter.get '/project/:Project_id/output/output.pdf', AuthorizationMiddlewear.ensureUserCanReadProject, CompileController.downloadPdf
# Used by the pdf viewers
webRouter.get /^\/project\/([^\/]*)\/output\/(.*)$/,
((req, res, next) ->
params =