class Api::V1::Issues::AssignersController < Api::V1::BaseController 

  before_action :require_public_and_member_above, only: [:index] 

  # 负责人列表 
  def index
    @assigners = User.joins(assigned_issues: :project).where(projects: {id: @project&.id})
    @assigners = @assigners.order("users.id=#{current_user.id} desc").distinct
    @assigners = @assigners.ransack(login_or_nickname_cont: params[:keyword]).result if params[:keyword].present?
    @assigners = kaminary_select_paginate(@assigners)
  end
end