Commit b85b1f26 authored by Marin Jankovski's avatar Marin Jankovski

Name the class singular, fix the failing spec.

parent 2ff68bfc
......@@ -41,7 +41,7 @@ module API
mount ProjectMembers
mount DeployKeys
mount ProjectHooks
mount ProjectGitHooks
mount ProjectGitHook
mount Ldap
mount Services
mount Files
......
module API
# Projects git hook API
class ProjectGitHooks < Grape::API
class ProjectGitHook < Grape::API
before { authenticate! }
before { authorize_admin_project }
......@@ -50,7 +50,7 @@ module API
:deny_delete_tag
]
if @git_hook.update_attributes attrs
if @git_hook && @git_hook.update_attributes(attrs)
present @git_hook, with: Entities::ProjectGitHook
else
not_found!
......
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