未验证 提交 99bb207e 编写于 作者: C Camil Staps

Fix tests

上级 e8bdcdf0
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册