Sha256: 553abb16887fe8d25d973a429eb2baed759bc63179dc74703e9922d1bf01ebdf

Contents?: true

Size: 706 Bytes

Versions: 48

Compression:

Stored size: 706 Bytes

Contents

# frozen_string_literal: true
module Blacklight
  module Routes
    class Searchable
      def initialize(defaults = {})
        @defaults = defaults
      end

      def call(mapper, _options = {})
        mapper.match '/', action: 'index', as: 'search', via: [:get, :post]
        mapper.get '/advanced', action: 'advanced_search', as: 'advanced_search'

        mapper.post ":id/track", action: 'track', as: 'track'
        mapper.get ":id/raw", action: 'raw', as: 'raw', defaults: { format: 'json' }

        mapper.get "opensearch"
        mapper.get 'suggest', as: 'suggest_index', defaults: { format: 'json' }
        mapper.get "facet/:id", action: 'facet', as: 'facet'
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 2 rubygems

Version Path
blacklight-7.40.0 lib/blacklight/routes/searchable.rb
blacklight-7.39.0 lib/blacklight/routes/searchable.rb
blacklight-7.38.0 lib/blacklight/routes/searchable.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/lib/blacklight/routes/searchable.rb
blacklight-7.37.0 lib/blacklight/routes/searchable.rb
blacklight-7.36.2 lib/blacklight/routes/searchable.rb
blacklight-7.36.1 lib/blacklight/routes/searchable.rb
blacklight-7.36.0 lib/blacklight/routes/searchable.rb
blacklight-7.35.0 lib/blacklight/routes/searchable.rb
blacklight-7.34.0 lib/blacklight/routes/searchable.rb
blacklight-7.33.1 lib/blacklight/routes/searchable.rb
blacklight-7.33.0 lib/blacklight/routes/searchable.rb
blacklight-7.32.0 lib/blacklight/routes/searchable.rb
blacklight-7.31.0 lib/blacklight/routes/searchable.rb
blacklight-7.30.0 lib/blacklight/routes/searchable.rb
blacklight-7.29.0 lib/blacklight/routes/searchable.rb
blacklight-7.28.0 lib/blacklight/routes/searchable.rb
blacklight-7.27.1 lib/blacklight/routes/searchable.rb
blacklight-7.27.0 lib/blacklight/routes/searchable.rb
blacklight-7.26.1 lib/blacklight/routes/searchable.rb