Commit ba01e519 authored by Z.J. van de Weg's avatar Z.J. van de Weg

Incorporate feedback

parent 182e2814
......@@ -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
......
......@@ -202,15 +202,13 @@ module API
build = get_build!(params[:build_id])
if build.playable?
bad_request!("Unplayable Build") unless build.playable?
build.play(current_user)
status 200
present build, with: Entities::Build,
user_can_download_artifacts: can?(current_user, :read_build, user_project)
else
bad_request!("Unplayable Build")
end
end
end
......
......@@ -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
......
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