Explorar o código

add comments to router, downcase route

express has case-insensitive routes
Brian Gough %!s(int64=10) %!d(string=hai) anos
pai
achega
8a0fa1321d
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      services/web/app/coffee/router.coffee

+ 3 - 1
services/web/app/coffee/router.coffee

@@ -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 =