This commit is contained in:
yystopf 2024-07-16 10:23:21 +08:00
parent 21eb842766
commit da6931d790
2 changed files with 3 additions and 1 deletions

View File

@ -408,7 +408,7 @@ class UsersController < ApplicationController
def projects
is_current_admin_user = User.current.logged? && (current_user&.admin? || current_user.id == @user.id)
scope = Projects::ListMyQuery.call(params, @user,is_current_admin_user)
scope, @home_top_ids = Projects::ListMyQuery.call(params, @user,is_current_admin_user)
@total_count = scope.size
@projects = kaminari_unlimit_paginate(scope)
end

View File

@ -83,5 +83,7 @@ class Projects::ListMyQuery < ApplicationQuery
scope.distinct.order("projects.#{sort} #{sort_direction}")
end
end
return scope, @home_top_ids
end
end