Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-05-31 00:24:17 +0300
committerToon Claes <toon@gitlab.com>2017-05-31 00:24:17 +0300
commit1e5506d01619780da68fc51ada58188a9070255b (patch)
treeb26383b07e7e4c279299e90d99d1b04804c49130 /lib
parentdb679788e46d55984a4af71034c6db11aed919e4 (diff)
Remove some deprecated methods
To avoid the use of slow queries, remove some deprecated methods and encourage the use of ProjectFinder to find projects.
Diffstat (limited to 'lib')
-rw-r--r--lib/api/v3/helpers.rb2
-rw-r--r--lib/api/v3/projects.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/v3/helpers.rb b/lib/api/v3/helpers.rb
index 06af286ef50..d9e76560d03 100644
--- a/lib/api/v3/helpers.rb
+++ b/lib/api/v3/helpers.rb
@@ -35,7 +35,7 @@ module API
end
if params[:visibility].present?
- projects = projects.search_by_visibility(params[:visibility])
+ projects = projects.where(visibility_level: Gitlab::VisibilityLevel.level_value(params[:visibility]))
end
projects = projects.where(archived: params[:archived])
diff --git a/lib/api/v3/projects.rb b/lib/api/v3/projects.rb
index 164612cb8dd..896c00b88e7 100644
--- a/lib/api/v3/projects.rb
+++ b/lib/api/v3/projects.rb
@@ -147,7 +147,7 @@ module API
get '/starred' do
authenticate!
- present_projects current_user.viewable_starred_projects
+ present_projects ProjectsFinder.new(current_user: current_user, params: { starred: true }).execute
end
desc 'Get all projects for admin user' do