mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
修改任务的默认排序为更新时间
This commit is contained in:
@@ -39,7 +39,7 @@ class Issues::ListQueryService < ApplicationService
|
||||
issues = issues.joins(:issue_tags).where(issue_tags: {id: params[:issue_tag_id].to_i}) if params[:issue_tag_id].present? && params[:issue_tag_id].to_s != "all"
|
||||
|
||||
order_type = params[:order_type] || "desc" #或者"asc"
|
||||
order_name = params[:order_name] || "created_on" #或者"updated_on"
|
||||
order_name = params[:order_name] || "updated_on" #或者"updated_on"
|
||||
issues.reorder("issues.#{order_name} #{order_type}")
|
||||
end
|
||||
|
||||
|
||||
@@ -9,3 +9,4 @@ json.array! @tags do |tag|
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user