Modify and fix output of delete and update of a runner

This commit is contained in:
Tomasz Maczukin 2016-02-10 14:20:51 +01:00
parent 24eed1c5c1
commit d1ac00aea3
2 changed files with 10 additions and 8 deletions

View file

@ -167,6 +167,14 @@ Example response:
"last_contact": "2016-01-25T16:39:48.066Z",
"name": null,
"platform": null,
"projects": [
{
"id": 1,
"name": "GitLab.org / GitLab Community Edition",
"path": "gitlab-org/gitlab-ce"
}
],
"token": "205086a8e3b9a2b818ffac9b89d102",
"revision": null,
"tag_list": [
"ruby",
@ -199,16 +207,10 @@ Example response:
```json
{
"active": true,
"architecture": null,
"description": "test-1-20150125-test",
"id": 6,
"is_shared": false,
"last_contact": "2016-01-25T16:39:48.066Z",
"name": null,
"platform": null,
"revision": null,
"tag_list": [],
"version": null
}
```

View file

@ -51,7 +51,7 @@ module API
attrs = attributes_for_keys [:description, :active, :tag_list]
if runner.update(attrs)
present runner, with: Entities::RunnerDetails
present runner, with: Entities::RunnerDetails, current_user: current_user
else
render_validation_error!(runner)
end
@ -68,7 +68,7 @@ module API
authenticate_delete_runner!(runner)
runner.destroy!
present runner, with: Entities::RunnerDetails
present runner, with: Entities::Runner
end
end