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

Try to make the URL more consistent between Rails and API

上级 c23f2aa5
......@@ -80,8 +80,8 @@ module API
# ref_name (required) - The ref from repository
# job (required) - The name for the build
# Example Request:
# GET /projects/:id/artifacts/download/:ref_name?job=name
get ':id/builds/artifacts/download/:ref_name',
# GET /projects/:id/artifacts/:ref_name/download?job=name
get ':id/builds/artifacts/:ref_name/download',
requirements: { ref_name: /.+/ } do
builds = user_project.builds_for(params[:job], params[:ref_name])
......
......@@ -187,12 +187,12 @@ describe API::API, api: true do
end
end
describe 'GET /projects/:id/artifacts/:ref_name/:build_name' do
describe 'GET /projects/:id/artifacts/:ref_name/download?job=name' do
include_context 'artifacts from ref and build name'
def path_from_ref(ref = pipeline.sha, job = build.name)
api(
"/projects/#{project.id}/builds/artifacts/download/#{ref}?job=#{job}",
"/projects/#{project.id}/builds/artifacts/#{ref}/download?job=#{job}",
user)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册