diff options
| author | Rémy Coutable <remy@rymai.me> | 2016-04-25 11:57:38 +0200 |
|---|---|---|
| committer | Rémy Coutable <remy@rymai.me> | 2016-04-25 11:57:38 +0200 |
| commit | abf15a9646db3f01da2566b101753ed9e28d9ebd (patch) | |
| tree | 2e74d22be613af6679380f2ada317c1dafd9dd7e /lib/api | |
| parent | fffc8a869128c5830d078e1f9286e7d2d6da420c (diff) | |
| parent | 41aa7a89fbe2f35d4a3b66bb55a98f224adc837c (diff) | |
| download | gitlab-ce-abf15a9646db3f01da2566b101753ed9e28d9ebd.tar.gz | |
Merge branch 'master' of https://dev.gitlab.org/gitlab/gitlabhq
Diffstat (limited to 'lib/api')
| -rw-r--r-- | lib/api/project_hooks.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/project_hooks.rb b/lib/api/project_hooks.rb index cf9938d25a7..ccca65cbe1c 100644 --- a/lib/api/project_hooks.rb +++ b/lib/api/project_hooks.rb @@ -103,10 +103,10 @@ module API required_attributes! [:hook_id] begin - @hook = ProjectHook.find(params[:hook_id]) - @hook.destroy + @hook = user_project.hooks.destroy(params[:hook_id]) rescue # ProjectHook can raise Error if hook_id not found + not_found!("Error deleting hook #{params[:hook_id]}") end end end |
