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
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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment