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

use build_id and user_id instead of build and user

Brian Gough 10 лет назад
Родитель
Сommit
e6dcce21fd

+ 6 - 6
services/web/app/coffee/Features/Compile/CompileController.coffee

@@ -104,12 +104,12 @@ module.exports = CompileController =
 
 	getFileFromClsi: (req, res, next = (error) ->) ->
 		project_id = req.params.Project_id
-		build = req.params.build
-		user = req.params.user
-		if user? and build?
-			url = "/project/#{project_id}/user/#{user}/build/#{build}/output/#{req.params.file}"
-		else if build?
-			url = "/project/#{project_id}/build/#{build}/output/#{req.params.file}"
+		build_id = req.params.build_id
+		user_id = req.params.user_id
+		if user_id? and build_id?
+			url = "/project/#{project_id}/user/#{user_id}/build/#{build_id}/output/#{req.params.file}"
+		else if build_id?
+			url = "/project/#{project_id}/build/#{build_id}/output/#{req.params.file}"
 		else
 			url = "/project/#{project_id}/output/#{req.params.file}"
 		CompileController.proxyToClsi(project_id, url, req, res, next)

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

@@ -118,7 +118,7 @@ module.exports = class Router
 			((req, res, next) ->
 				params =
 					"Project_id": req.params[0]
-					"build":      req.params[1]
+					"build_id":   req.params[1]
 					"file":       req.params[2]
 				req.params = params
 				next()
@@ -129,8 +129,8 @@ module.exports = class Router
 			((req, res, next) ->
 				params =
 					"Project_id": req.params[0]
-					"user":       req.params[1]
-					"build":      req.params[2]
+					"user_id":    req.params[1]
+					"build_id":   req.params[2]
 					"file":       req.params[3]
 				req.params = params
 				next()