修改列表页的用户id

This commit is contained in:
sylor_huang@126.com 2020-04-03 17:23:47 +08:00
parent 6088d71f90
commit bfbcb350f7
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class ProjectsController < ApplicationController
def index
is_admin = current_user && current_user&.admin?
scope = Projects::ListQuery.call(params.merge(is_admin: is_admin))
scope = Projects::ListQuery.call(params.merge(is_admin: is_admin, user_id: current_user.try(:id)))
@total_count = scope.size
@projects = paginate(scope)
end