Commit bb5f0671 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Rename to ref_name so it's aligning with API

parent 33368281
...@@ -60,8 +60,8 @@ class Projects::ArtifactsController < Projects::ApplicationController ...@@ -60,8 +60,8 @@ class Projects::ArtifactsController < Projects::ApplicationController
end end
def build_from_ref def build_from_ref
if params[:ref] if params[:ref_name]
builds = project.builds_for(params[:build_name], params[:ref]) builds = project.builds_for(params[:build_name], params[:ref_name])
builds.success.latest.first builds.success.latest.first
end end
......
...@@ -735,8 +735,8 @@ Rails.application.routes.draw do ...@@ -735,8 +735,8 @@ Rails.application.routes.draw do
resources :artifacts, only: [] do resources :artifacts, only: [] do
collection do collection do
get :search, path: ':ref/:build_name/*path', format: false, get :search, path: ':ref_name/:build_name/*path', format: false,
constraints: { ref: /.+/ } # ref could have / constraints: { ref_name: /.+/ } # ref could have /
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment