diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
commit | 9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch) | |
tree | 70467ae3692a0e35e5ea56bcb803eb512a10bedb /lib/api/search.rb | |
parent | 4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff) |
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'lib/api/search.rb')
-rw-r--r-- | lib/api/search.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/api/search.rb b/lib/api/search.rb index f0ffe6ba443..8fabf379d49 100644 --- a/lib/api/search.rb +++ b/lib/api/search.rb @@ -22,13 +22,15 @@ module API users: Entities::UserBasic }.freeze - SCOPE_PRELOAD_METHOD = { - merge_requests: :with_api_entity_associations, - projects: :with_api_entity_associations, - issues: :with_api_entity_associations, - milestones: :with_api_entity_associations, - commits: :with_api_commit_entity_associations - }.freeze + def scope_preload_method + { + merge_requests: :with_api_entity_associations, + projects: :with_api_entity_associations, + issues: :with_api_entity_associations, + milestones: :with_api_entity_associations, + commits: :with_api_commit_entity_associations + }.freeze + end def search(additional_params = {}) search_params = { @@ -60,7 +62,7 @@ module API end def preload_method - SCOPE_PRELOAD_METHOD[params[:scope].to_sym] + scope_preload_method[params[:scope].to_sym] end def verify_search_scope!(resource:) |