提交 bb5f0671 编写于 作者: L Lin Jen-Shin

Rename to ref_name so it's aligning with API

上级 33368281
......@@ -60,8 +60,8 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
def build_from_ref
if params[:ref]
builds = project.builds_for(params[:build_name], params[:ref])
if params[:ref_name]
builds = project.builds_for(params[:build_name], params[:ref_name])
builds.success.latest.first
end
......
......@@ -735,8 +735,8 @@ Rails.application.routes.draw do
resources :artifacts, only: [] do
collection do
get :search, path: ':ref/:build_name/*path', format: false,
constraints: { ref: /.+/ } # ref could have /
get :search, path: ':ref_name/:build_name/*path', format: false,
constraints: { ref_name: /.+/ } # ref could have /
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册