Browse Source

fix

pull/347/head
yystopf 1 year ago
parent
commit
da6931d790
2 changed files with 3 additions and 1 deletions
  1. +1
    -1
      app/controllers/users_controller.rb
  2. +2
    -0
      app/queries/projects/list_my_query.rb

+ 1
- 1
app/controllers/users_controller.rb 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


+ 2
- 0
app/queries/projects/list_my_query.rb 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

Loading…
Cancel
Save