fix: project list query

This commit is contained in:
2021-09-07 17:19:38 +08:00
parent 74a9743bcc
commit 84aed0391a
3 changed files with 17 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ class ProjectsController < ApplicationController
end
def index
scope = Projects::ListQuery.call(params)
scope = current_user.logged? ? Projects::ListQuery.call(params, current_user.id) : Projects::ListQuery.call(params)
# @projects = kaminari_paginate(scope)
@projects = paginate scope.includes(:project_category, :project_language, :repository, :project_educoder, :owner, :project_units)