summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-05-23 22:40:39 +0200
committerToon Claes <toon@gitlab.com>2017-05-30 22:45:59 +0200
commita1deed629e03d8db47deb1bcf795ae8abaf2c847 (patch)
tree2c64d41673e7d8d061839ea13c1897f14aa43915 /lib/api/helpers.rb
parent0725050802dd30d4c235b6a2d28dd494d2d7429b (diff)
downloadgitlab-ce-a1deed629e03d8db47deb1bcf795ae8abaf2c847.tar.gz
Use ProjectFinder to filter the projects
Instead of trying to do the heavy lifting in the API itself, use the existing features of the ProjectFinder.
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb13
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 0dc33eb2097..2855bd7385d 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -261,19 +261,6 @@ module API
projects = projects.merge(current_user.owned_projects)
end
- if params[:starred]
- projects = projects.merge(current_user.starred_projects)
- end
-
- if params[:search].present?
- projects = projects.search(params[:search])
- end
-
- if params[:visibility].present?
- projects = projects.search_by_visibility(params[:visibility])
- end
-
- projects = projects.where(archived: params[:archived])
projects.reorder(params[:order_by] => params[:sort])
end