修改后端bug
This commit is contained in:
parent
d2a15e48a1
commit
973e6646b6
|
@ -48,8 +48,8 @@ class ProjectsController < ApplicationController
|
||||||
# projects = Project.visible
|
# projects = Project.visible
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
if params[:user_id].to_i != 2
|
if current_user&.logged?
|
||||||
projects = Project.list_user_projects(params[:user_id])
|
projects = Project.list_user_projects(current_user.id)
|
||||||
else
|
else
|
||||||
projects = Project.visible
|
projects = Project.visible
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,7 +17,7 @@ class Projects::ListQuery < ApplicationQuery
|
||||||
# else
|
# else
|
||||||
# projects = Project.visible
|
# projects = Project.visible
|
||||||
# end
|
# 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])
|
projects = Project.list_user_projects(params[:user_id])
|
||||||
else
|
else
|
||||||
projects = Project.visible
|
projects = Project.visible
|
||||||
|
|
Loading…
Reference in New Issue