fixed 项目列表查询排序优化

This commit is contained in:
“xxq250” 2022-11-15 14:00:31 +08:00
parent b05e08a1c5
commit 62a9941e22
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class Projects::ListQuery < ApplicationQuery
sort = params[:sort_by] || "updated_on"
sort_direction = params[:sort_direction] || "desc"
# collection = optimize_sorting(collection, sort) if params[:category_id].present?
collection = optimize_sorting(collection, sort) if params[:category_id].present?
custom_sort(collection, sort, sort_direction)
# scope = scope.reorder("projects.#{sort} #{sort_direction}")