aboutsummaryrefslogtreecommitdiff
blob: 84b0c9fb0d81cae10d449432e27354f318e989eb (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
require 'sidekiq/web'

Rails.application.routes.draw do
  get 'about/feedback'
  post 'about/feedback'
  get 'about', to: 'about#index'
  get 'about/feeds'
  get 'about/help'
  get 'about/changelog'
  get 'about/queries'

  root 'index#index'

  # Catch all old pgo feeds
  get 'feed(/*stuff)', to: 'about#legacy', defaults: { format: 'atom' }

  resources :categories, only: %i[index show search]

  resources :packages, only: [:index, :show, :search], constraints: { id: /[^.]*/ } do
    collection do
      get 'search'
      get 'suggest'
      get 'resolve'

      get 'added'
      get 'updated'
      get 'stable'
      get 'keyworded'
    end

    member do
      get 'changelog'
    end
  end

  resources :useflags do
    collection do
      get 'popular'
      get 'search'
      get 'suggest'
    end
  end

  resources :arches do
    member do
      get 'stable'
      get 'keyworded'
    end
  end

  mount Sidekiq::Web, at: '/sidekiq'
end