diff options
-rw-r--r-- | app/controllers/projects/starrers_controller.rb | 2 | ||||
-rw-r--r-- | app/finders/users_star_projects_finder.rb | 2 | ||||
-rw-r--r-- | lib/api/projects.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/starrers_controller.rb b/app/controllers/projects/starrers_controller.rb index 006898a7427..8f629eb8d13 100644 --- a/app/controllers/projects/starrers_controller.rb +++ b/app/controllers/projects/starrers_controller.rb @@ -9,7 +9,7 @@ class Projects::StarrersController < Projects::ApplicationController def index @sort = params[:sort].presence || sort_value_name - @starrers = UsersStarProjectsFinder.new(params, @project, current_user: @current_user).execute + @starrers = UsersStarProjectsFinder.new(@project, params, current_user: @current_user).execute @total_count = @project.starrers.size @public_count = @starrers.size diff --git a/app/finders/users_star_projects_finder.rb b/app/finders/users_star_projects_finder.rb index e3657f9915c..5b19b98451c 100644 --- a/app/finders/users_star_projects_finder.rb +++ b/app/finders/users_star_projects_finder.rb @@ -5,7 +5,7 @@ class UsersStarProjectsFinder attr_accessor :params - def initialize(params = {}, project, current_user: nil) + def initialize(project, params = {}, current_user: nil) @params = params @project = project @current_user = current_user diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 6d221200372..996205d4b7b 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -382,7 +382,7 @@ module API use :pagination end get ':id/starrers' do - starrers = UsersStarProjectsFinder.new(params, user_project, current_user: current_user).execute + starrers = UsersStarProjectsFinder.new(user_project, params, current_user: current_user).execute present paginate(starrers), with: Entities::UserStarsProject end |