diff options
author | Igor <idrozdov@gitlab.com> | 2019-03-07 14:59:43 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-03-07 14:59:43 +0000 |
commit | e779477e8c9df3baf727ed5b52d9a33ad0f1a716 (patch) | |
tree | 741094abcd1d15290a888d32d1b4994c919015c6 /lib/api | |
parent | c87b0696b6c000e5ced88dd33f5e662e8e231864 (diff) | |
download | gitlab-ce-e779477e8c9df3baf727ed5b52d9a33ad0f1a716.tar.gz |
Revert "Merge branch 'id-1951-filter-merge-requests-by-approvers' into 'master'"
This reverts merge request !24982
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/helpers/custom_validators.rb | 13 | ||||
-rw-r--r-- | lib/api/merge_requests.rb | 5 |
2 files changed, 0 insertions, 18 deletions
diff --git a/lib/api/helpers/custom_validators.rb b/lib/api/helpers/custom_validators.rb index c86eae6f2da..1058f4e8a5e 100644 --- a/lib/api/helpers/custom_validators.rb +++ b/lib/api/helpers/custom_validators.rb @@ -22,22 +22,9 @@ module API message: "should be an integer, 'None' or 'Any'" end end - - class ArrayNoneAny < Grape::Validations::Base - def validate_param!(attr_name, params) - value = params[attr_name] - - return if value.is_a?(Array) || - [IssuableFinder::FILTER_NONE, IssuableFinder::FILTER_ANY].include?(value.to_s.downcase) - - raise Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)], - message: "should be an array, 'None' or 'Any'" - end - end end end end Grape::Validations.register_validator(:absence, ::API::Helpers::CustomValidators::Absence) Grape::Validations.register_validator(:integer_none_any, ::API::Helpers::CustomValidators::IntegerNoneAny) -Grape::Validations.register_validator(:array_none_any, ::API::Helpers::CustomValidators::ArrayNoneAny) diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb index 98dcc388f44..123b7a83185 100644 --- a/lib/api/merge_requests.rb +++ b/lib/api/merge_requests.rb @@ -12,9 +12,6 @@ module API helpers do params :optional_params_ee do end - - params :optional_merge_requests_search_params do - end end def self.update_params_at_least_one_of @@ -115,8 +112,6 @@ module API optional :search, type: String, desc: 'Search merge requests for text present in the title, description, or any combination of these' optional :in, type: String, desc: '`title`, `description`, or a string joining them with comma' optional :wip, type: String, values: %w[yes no], desc: 'Search merge requests for WIP in the title' - - use :optional_merge_requests_search_params use :pagination end end |