fixed 项目列表支持多个标签名称查询, 定制项目标签可查自己私有仓
This commit is contained in:
parent
0dea83488d
commit
05dd162646
|
@ -77,7 +77,10 @@ class Projects::ListQuery < ApplicationQuery
|
|||
end
|
||||
|
||||
def by_project_topic(items)
|
||||
if params[:topic_name].present?
|
||||
if params[:topic_name].present? && @current_user_id.present?
|
||||
Project.visible.where(status: 1).with_project_topic_name(params[:topic_name].to_s.split(","))
|
||||
.or(Project.is_private.with_project_topic_name(params[:topic_name].to_s.split(",")).where(user_id: @current_user_id))
|
||||
elsif params[:topic_name].present?
|
||||
items.with_project_topic_name(params[:topic_name].to_s.split(","))
|
||||
else
|
||||
items.with_project_topic(params[:topic_id])
|
||||
|
|
Loading…
Reference in New Issue