Sha256: 2fbd4e2efe2e8259dfa8d16e79dee63dbfac839aaac3277b5d4bd3cf3d75217c

Contents?: true

Size: 1.51 KB

Versions: 7

Compression:

Stored size: 1.51 KB

Contents

require 'sidekiq/web'
require 'symphonia/admin_constraint'
Symphonia::Engine.routes.draw do

  get :api, to: 'api#index'

  get '/login', to: 'user_sessions#new'
  delete '/logout', to: 'user_sessions#destroy'
  get '/register', to: 'accounts#register', as: 'account_register'
  post '/register', to: 'accounts#create'

  get '/activation/:activation_code', to: 'accounts#activation', as: 'activation'
  match '/reset_password/:id', to: 'accounts#reset_password', as: 'reset_password', via: [:get, :put]

  scope 'admin' do
    get 'user/current', to: 'users#show', as: 'user_current'

    root 'admin#index'

    resources :roles
    resources :user_sessions
    resources :users do
      member do
        post :archive
        post :unarchive
      end
    end
    resource :account do
      collection do
        get :new_activation
        get :resend_activation
        post :resend_activation
        get :lost_password
        post :lost_password
      end
      member do
        match :reset_password, via: [:get, :put]
      end
    end

    get 'filters/:type/options', to: 'filters#options', as: 'filters_options'

    match 'attachments/:id', to: 'attachments#show', via: [:get, :post], as: 'attachment'
    delete 'attachments/:id', to: 'attachments#destroy', as: 'destroy_attachment'
    patch 'attachments(/:id)/reorder(/:position)', to: 'attachments#reorder', as: 'reorder_attachment'

    get 'test_mail', to: 'admin#test_mail'

    mount ::Sidekiq::Web => '/sidekiq', constraints: Symphonia::AdminConstraint.new
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
symphonia-3.2.3 config/routes.rb
symphonia-3.2.2 config/routes.rb
symphonia-3.2.1 config/routes.rb
symphonia-3.1.5 config/routes.rb
symphonia-3.1.4 config/routes.rb
symphonia-3.1.3 config/routes.rb
symphonia-3.1.2 config/routes.rb