mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
修改后端bug
This commit is contained in:
@@ -48,8 +48,8 @@ class ProjectsController < ApplicationController
|
||||
# projects = Project.visible
|
||||
# end
|
||||
#
|
||||
if params[:user_id].to_i != 2
|
||||
projects = Project.list_user_projects(params[:user_id])
|
||||
if current_user&.logged?
|
||||
projects = Project.list_user_projects(current_user.id)
|
||||
else
|
||||
projects = Project.visible
|
||||
end
|
||||
|
||||
@@ -17,7 +17,7 @@ class Projects::ListQuery < ApplicationQuery
|
||||
# else
|
||||
# projects = Project.visible
|
||||
# end
|
||||
if params[:user_id].to_i != 2
|
||||
if params[:user_id].to_i != 2 && params[:user_id].to_i != 0
|
||||
projects = Project.list_user_projects(params[:user_id])
|
||||
else
|
||||
projects = Project.visible
|
||||
|
||||
Reference in New Issue
Block a user