-
Notifications
You must be signed in to change notification settings - Fork 7
/
routes.rb
35 lines (30 loc) · 1.68 KB
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'sidekiq/pro/web'
Rails.application.routes.draw do
mount HealthMonitor::Engine, at: "/"
devise_for :users, controllers: { omniauth_callbacks: "users/omniauth_callbacks", sessions: "users/sessions" }
resources :dump_files, only: [:show]
resources :events, only: [:show, :index, :destroy]
resources :dumps, only: [:show]
scope :locations do
resources :holding_locations
resources :libraries
resources :delivery_locations
get 'digital_locations', to: 'delivery_locations#digital_locations'
end
get '/bibliographic', to: 'bibliographic#index', defaults: { format: :txt }
get '/bibliographic/:bib_id/availability', to: 'bibliographic#availability'
get '/bibliographic/availability', to: 'bibliographic#availability_many'
get '/bibliographic/:bib_id/holdings/:holding_id/availability', to: 'bibliographic#availability_holding'
get '/bibliographic/:bib_id', to: 'bibliographic#bib', defaults: { format: :xml }, as: :show_bib
get '/bibliographic/:bib_id/solr', to: 'bibliographic#bib_solr'
get '/bibliographic/:bib_id/holdings', to: 'bibliographic#bib_holdings', defaults: { format: :xml }
get '/bibliographic/:bib_id/items', to: 'bibliographic#bib_items', defaults: { format: :json }
get '/availability', to: 'availability#index', defaults: { format: :json }
get '/barcode', to: 'barcode#index', defaults: { format: :txt }
get '/barcode/:barcode/scsb', to: 'barcode#scsb', defaults: { format: :xml }
get '/patron/:patron_id', to: 'patron#patron_info', format: false, defaults: { format: :json }, constraints: { patron_id: /[^\/]+/ }
require 'sidekiq/web'
authenticate :user, ->(user) { user.catalog_admin? } do
mount Sidekiq::Web => '/sidekiq'
end
end