Sha256: 96b4c517f51810f84bbe2e25f95d50b62c968ca9d9bb2cbfb2383605e5cf70de

Contents?: true

Size: 1.07 KB

Versions: 6

Compression:

Stored size: 1.07 KB

Contents

# frozen_string_literal: true

Stenographer::Engine.routes.draw do
  resources :changes, only: %i[index show], constraints: Stenographer::RoutingConstraints::ViewerOnly.new
  resources :changes, only: %i[create] # Created separately because we don't want it behind the routing constraints

  scope '/admin' do
    get '/' => 'admin#index', as: :admin_index, constraints: Stenographer::RoutingConstraints::ManagerOnly.new
  end

  namespace :admin do
    resources :authentications, only: %i[index show destroy], constraints: Stenographer::RoutingConstraints::ManagerOnly.new
    resources :changes, constraints: Stenographer::RoutingConstraints::ManagerOnly.new
    resources :outputs, constraints: Stenographer::RoutingConstraints::ManagerOnly.new
  end

  get '/auth/:provider', to: 'authentications#create', as: :authentication # Used so we can access authentication_path('provider')
  get '/auth/:provider/callback', to: 'authentications#create'
  get '/auth/failure', to: 'authentications#failure'

  root 'changes#index', constraints: Stenographer::RoutingConstraints::ViewerOnly.new
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
stenographer-rails-0.6.5 config/routes.rb
stenographer-rails-0.6.4 config/routes.rb
stenographer-rails-0.6.3 config/routes.rb
stenographer-rails-0.6.2 config/routes.rb
stenographer-rails-0.6.1 config/routes.rb
stenographer-rails-0.6.0 config/routes.rb