Skip to content
Snippets Groups Projects
Commit ba01e519 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg
Browse files

Incorporate feedback

parent 182e2814
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -260,10 +260,10 @@ GET /projects/:id/deployments/:deployment_id
| Attribute | Type | Required | Description |
|-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project |
| `deployment_id` | string | yes | The ID of the deployment |
| `deployment_id` | integer | yes | The ID of the deployment |
 
```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/deployment/1"
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/deployments/1"
```
 
Example of response
Loading
Loading
Loading
Loading
@@ -202,15 +202,13 @@ module API
 
build = get_build!(params[:build_id])
 
if build.playable?
build.play(current_user)
bad_request!("Unplayable Build") unless build.playable?
 
status 200
present build, with: Entities::Build,
user_can_download_artifacts: can?(current_user, :read_build, user_project)
else
bad_request!("Unplayable Build")
end
build.play(current_user)
status 200
present build, with: Entities::Build,
user_can_download_artifacts: can?(current_user, :read_build, user_project)
end
end
 
Loading
Loading
Loading
Loading
@@ -419,6 +419,7 @@ describe API::API, api: true do
it 'plays the build' do
expect(response).to have_http_status 200
expect(json_response['user']['id']).to eq(user.id)
expect(json_response['id']).to eq(build.id)
end
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