Просмотр исходного кода

add route to serve files from top level of per user containers

Brian Gough 10 лет назад
Родитель
Сommit
a6f6392e40
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      services/clsi/app.coffee

+ 5 - 0
services/clsi/app.coffee

@@ -96,6 +96,11 @@ app.get "/project/:project_id/build/:build_id/output/*", (req, res, next) ->
 	req.url = "/#{req.params.project_id}/" + OutputCacheManager.path(req.params.build_id, "/#{req.params[0]}")
 	staticServer(req, res, next)
 
+app.get "/project/:project_id/user/:user_id/output/*", (req, res, next) ->
+	# for specific user get the path to the top level file
+	req.url = "/#{req.params.project_id}-#{req.params.user_id}/#{req.params[0]}"
+	staticServer(req, res, next)
+
 app.get "/project/:project_id/output/*", (req, res, next) ->
 	if req.query?.build? && req.query.build.match(OutputCacheManager.BUILD_REGEX)
 		# for specific build get the path from the OutputCacheManager (e.g. .clsi/buildId)