Sha256: fe2a029ddbc49e1feb9cb22d58a9fba614cf480a41acc46dd811864b1377404b

Contents?: true

Size: 1.47 KB

Versions: 9

Compression:

Stored size: 1.47 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'
  get '/reset_password/:id', to: 'accounts#reset_password', as: 'reset_password'

  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

9 entries across 9 versions & 1 rubygems

Version Path
symphonia-3.1.1 config/routes.rb
symphonia-3.1.0 config/routes.rb
symphonia-3.0.3 config/routes.rb
symphonia-3.0.2 config/routes.rb
symphonia-2.2.1 config/routes.rb
symphonia-3.0.1 config/routes.rb
symphonia-3.0.0 config/routes.rb
symphonia-2.1.8 config/routes.rb
symphonia-2.1.7 config/routes.rb