Skip to content
Snippets Groups Projects
Commit 4bb3787e authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Try to make the URL more consistent between Rails and API

parent c23f2aa5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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])
 
Loading
Loading
Loading
Loading
@@ -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
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment