mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX 版本库兼容euducoder平台数据
This commit is contained in:
@@ -10,10 +10,9 @@ class Projects::ListQuery < ApplicationQuery
|
||||
end
|
||||
|
||||
def call
|
||||
q = Project.visible.search_project(params[:search])
|
||||
q = Project.visible.by_name_or_identifier(params[:search])
|
||||
|
||||
scope = q.result(distinct: true)
|
||||
.includes(:project_category, :project_language, :repository, owner: :user_extension)
|
||||
scope = q
|
||||
.with_project_type(params[:project_type])
|
||||
.with_project_category(params[:category_id])
|
||||
.with_project_language(params[:language_id])
|
||||
@@ -21,7 +20,9 @@ class Projects::ListQuery < ApplicationQuery
|
||||
sort = params[:sort_by] || "updated_on"
|
||||
sort_direction = params[:sort_direction] || "desc"
|
||||
|
||||
scope = scope.no_anomory_projects.reorder("projects.#{sort} #{sort_direction}")
|
||||
scope
|
||||
custom_sort(scope, sort, sort_direction)
|
||||
|
||||
# scope = scope.reorder("projects.#{sort} #{sort_direction}")
|
||||
# scope
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user