2023-02-07 17:12:43 +08:00
|
|
|
class Api::V1::Issues::AuthorsController < Api::V1::BaseController
|
|
|
|
|
before_action :require_public_and_member_above, only: [:index]
|
|
|
|
|
|
|
|
|
|
# 发布人列表
|
|
|
|
|
def index
|
|
|
|
|
@authors = User.joins(issues: :project).where(projects: {id: @project&.id})
|
2023-02-09 09:29:02 +08:00
|
|
|
@authors = @authors.order("users.id=#{current_user.id} desc").distinct
|
2023-02-15 17:24:36 +08:00
|
|
|
@authors = @authors.ransack(login_or_nickname_cont: params[:keyword]).result if params[:keyword].present?
|
2023-02-07 17:12:43 +08:00
|
|
|
@authors = kaminary_select_paginate(@authors)
|
|
|
|
|
end
|
|
|
|
|
end
|