diff --git a/lib/api/helpers/members_helpers.rb b/lib/api/helpers/members_helpers.rb index 9e624903a62..3ccae8d85cc 100644 --- a/lib/api/helpers/members_helpers.rb +++ b/lib/api/helpers/members_helpers.rb @@ -5,6 +5,11 @@ module API module Helpers module MembersHelpers + extend Grape::API::Helpers + + params :optional_filter_params_ee do + end + def find_source(source_type, id) public_send("find_#{source_type}!", id) # rubocop:disable GitlabSecurity/PublicSend end @@ -42,3 +47,5 @@ module API end end end + +API::Helpers::MembersHelpers.prepend_if_ee('EE::API::Helpers::MembersHelpers') diff --git a/lib/api/members.rb b/lib/api/members.rb index 3526671e7f9..e745bd0d4a9 100644 --- a/lib/api/members.rb +++ b/lib/api/members.rb @@ -19,6 +19,7 @@ module API params do optional :query, type: String, desc: 'A query string to search for members' optional :user_ids, type: Array[Integer], desc: 'Array of user ids to look up for membership' + use :optional_filter_params_ee use :pagination end @@ -157,5 +158,3 @@ module API end end end - -API::Members.prepend_if_ee('EE::API::Members')