summaryrefslogtreecommitdiff
path: root/lib/api/system_hooks.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/system_hooks.rb')
-rw-r--r--lib/api/system_hooks.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/system_hooks.rb b/lib/api/system_hooks.rb
index 32f731c5652..708ec8cfe70 100644
--- a/lib/api/system_hooks.rb
+++ b/lib/api/system_hooks.rb
@@ -27,12 +27,12 @@ module API
optional :enable_ssl_verification, type: Boolean, desc: "Do SSL verification when triggering the hook"
end
post do
- hook = SystemHook.new declared(params, include_missing: false).to_h
+ hook = SystemHook.new(declared_params(include_missing: false))
if hook.save
present hook, with: Entities::Hook
else
- not_found!
+ render_validation_error!(hook)
end
end