Sha256: f6b5b7466c7dfe7dcee80667d2432eba92650010b0209d2c0fa19f9ac0342a43

Contents?: true

Size: 720 Bytes

Versions: 11

Compression:

Stored size: 720 Bytes

Contents

ForemanStatistics::Engine.routes.draw do
  resources :trends do
    collection do
      post 'count'
      get 'help', :action => :welcome
    end
  end

  resources :statistics, :only => %i[index show], constraints: ->(req) { req.format == :json }
  match 'statistics' => 'react#index', :via => :get

  namespace :api, defaults: { format: 'json' } do
    scope '(:apiv)', module: :v2, defaults: { apiv: 'v2' }, apiv: /v1|v2/, constraints: ApiConstraints.new(version: 2, default: true) do
      resources :trends, :only => %i[create index show destroy]
      resources :statistics, :only => [:index]
    end
  end
end

Foreman::Application.routes.draw do
  mount ForemanStatistics::Engine, at: '/foreman_statistics'
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
foreman_statistics-2.1.0 config/routes.rb
foreman_statistics-2.0.1 config/routes.rb
foreman_statistics-2.0.0 config/routes.rb
foreman_statistics-1.2.0 config/routes.rb
foreman_statistics-1.1.1 config/routes.rb
foreman_statistics-1.1.0 config/routes.rb
foreman_statistics-1.0.0 config/routes.rb
foreman_statistics-0.1.3 config/routes.rb
foreman_statistics-0.1.2 config/routes.rb
foreman_statistics-0.1.1 config/routes.rb
foreman_statistics-0.1.0 config/routes.rb