mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
新增: 关注列表时间范围查询
This commit is contained in:
@@ -287,7 +287,10 @@ class ProjectsController < ApplicationController
|
||||
end
|
||||
|
||||
def watch_users
|
||||
start_at = params[:start_at]
|
||||
end_at = params[:end_at]
|
||||
watchers = @project.watchers.includes(:user).order("watchers.created_at desc").distinct
|
||||
watchers = watchers.where("watchers.created_at > ? and watchers.created_at < ?", Time.at(start_at), Time.at(end_at)) if start_at.present? && end_at.present?
|
||||
@watchers_count = watchers.size
|
||||
@watchers = paginate(watchers)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user