forked from Gitlink/forgeplus
修改后端bug
This commit is contained in:
parent
d2a15e48a1
commit
973e6646b6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue