From 76bd09326fe070d4c865b6fbc1718673d096c178 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Mon, 14 Nov 2016 14:44:27 +0100 Subject: Use declared_params helper in API --- lib/api/system_hooks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/api/system_hooks.rb') diff --git a/lib/api/system_hooks.rb b/lib/api/system_hooks.rb index b6bfff9f20f..708ec8cfe70 100644 --- a/lib/api/system_hooks.rb +++ b/lib/api/system_hooks.rb @@ -27,7 +27,7 @@ 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 -- cgit v1.2.1