class ShixunListsController < ApplicationController
  def index
    # 去除开头标点符号
    @reg = /^[,。?:;‘’!“”—……、]/
    # 附件的替换
    @atta_reg = /!\[.*]\(\/api\/attachments\/\d+\)/
    @results = ShixunSearchService.call(search_params, current_laboratory)
  end

  private

  def search_params
    params.permit(:keyword, :type, :page, :limit, :order, :status, :diff, :sort, :no_jupyter)
  end
end