Incorporate feedback
This commit is contained in:
parent
182e28141d
commit
ba01e519e2
3 changed files with 9 additions and 10 deletions
|
@ -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?
|
||||
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
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue