Commit ee0e9830c1c1e4c54fd0b18fadef50f76c3680a4

Authored by Dmitriy Zaporozhets
1 parent 0b57c118

gitlab-ci service api: clean values instead of destroy

Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
lib/api/services.rb
... ... @@ -31,7 +31,11 @@ module API
31 31 # DELETE /projects/:id/keys/:id
32 32 delete ":id/services/gitlab-ci" do
33 33 if user_project.gitlab_ci_service
34   - user_project.gitlab_ci_service.destroy
  34 + user_project.gitlab_ci_service.update_attributes(
  35 + active: false,
  36 + token: nil,
  37 + project_url: nil
  38 + )
35 39 end
36 40 end
37 41 end
... ...