summaryrefslogtreecommitdiff
path: root/lib/gitlab
diff options
context:
space:
mode:
authorJarka Kadlecová <jarka@gitlab.com>2018-02-06 17:53:42 +0100
committerJarka Kadlecová <jarka@gitlab.com>2018-02-06 17:58:18 +0100
commit1b2400b529628da08e406e2391ef37c0b05f889e (patch)
treed2c0c3f355d7a60a9de2c7370b3b19a77b8e50a6 /lib/gitlab
parent7381944565701f2a8db5d58d5bc3c7e52e7f60bf (diff)
downloadgitlab-ce-1b2400b529628da08e406e2391ef37c0b05f889e.tar.gz
Return only limited pagination headers for search API endpoints
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/project_search_results.rb4
-rw-r--r--lib/gitlab/snippet_search_results.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/project_search_results.rb b/lib/gitlab/project_search_results.rb
index 0846fdc4de3..9e2fa07a205 100644
--- a/lib/gitlab/project_search_results.rb
+++ b/lib/gitlab/project_search_results.rb
@@ -10,7 +10,7 @@ module Gitlab
@per_page = per_page
end
- def objects(scope, page = nil, without_counts = true)
+ def objects(scope, page = nil)
case scope
when 'notes'
notes.page(page).per(per_page)
@@ -21,7 +21,7 @@ module Gitlab
when 'commits'
Kaminari.paginate_array(commits).page(page).per(per_page)
else
- super(scope, page, without_counts)
+ super(scope, page, false)
end
end
diff --git a/lib/gitlab/snippet_search_results.rb b/lib/gitlab/snippet_search_results.rb
index 98c43475303..4f86b3e8f73 100644
--- a/lib/gitlab/snippet_search_results.rb
+++ b/lib/gitlab/snippet_search_results.rb
@@ -9,14 +9,14 @@ module Gitlab
@query = query
end
- def objects(scope, page = nil, without_counts = true)
+ def objects(scope, page = nil)
case scope
when 'snippet_titles'
snippet_titles.page(page).per(per_page)
when 'snippet_blobs'
snippet_blobs.page(page).per(per_page)
else
- super(scope, nil, without_counts)
+ super(scope, nil, false)
end
end