Commit 9d47aef7 authored by Alex Kalderimis's avatar Alex Kalderimis

Support either service or integration parameter

Continue to support `:service` for backwards compatibility, but
prefer `:integration`.
parent c77047b8
......@@ -81,7 +81,9 @@ module IntegrationParams
def integration_params
dynamic_params = @service.event_channel_names + @service.event_names # rubocop:disable Gitlab/ModuleWithInstanceVariables
return_value = params.permit(:id, integration: allowed_integration_params + dynamic_params)
allowed = allowed_integration_params + dynamic_params
return_value = params.permit(:id, integration: allowed, service: allowed)
return_value[:integration] ||= return_value.delete(:service)
param_values = return_value[:integration]
if param_values.is_a?(ActionController::Parameters)
......
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