aboutsummaryrefslogtreecommitdiff
blob: 570ce7c0278c1e73bdbad9f044f64b21f2dcaf83 (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
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'

  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