FIX coder review

This commit is contained in:
Jasder 2020-04-23 23:02:37 +08:00
parent 1e1e13898b
commit 495a8dd48e
1 changed files with 1 additions and 2 deletions

View File

@ -6,8 +6,7 @@ class ProjectsController < ApplicationController
before_action :authorizate_user_can_edit_project!, only: %i[update] before_action :authorizate_user_can_edit_project!, only: %i[update]
def index def index
is_admin = current_user && current_user&.admin? scope = Projects::ListQuery.call(params)
scope = Projects::ListQuery.call(params.merge(is_admin: is_admin, user_id: current_user.try(:id)))
@total_count = scope.size @total_count = scope.size
@projects = paginate(scope) @projects = paginate(scope)