Rename to ref_name so it's aligning with API
This commit is contained in:
parent
3336828152
commit
bb5f06718c
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue