Skip to content
Snippets Groups Projects
routes.rb 1.4 KiB
Newer Older
Rails.application.routes.draw do
  require 'sidekiq/web'

  devise_for :users
  namespace :auth do
    mount_devise_token_auth_for 'User', skip: [:omniauth_callbacks]
  end
  namespace :management do
    root 'welcome#index'

    resources :statistics do
      collection do
        get :users
        get :collections
        get :accesses
        get :downloads
      end
    end
    get 'highlights/new' => 'highlights#new', as: 'new_highlights'
    get 'highlights/delete' => 'highlights#delete', as: 'delete_highlights'
    get 'highlights/index' => 'highlights#index', as: 'index_highlights'
Alexandre Peres Arias's avatar
Alexandre Peres Arias committed

    resources :carousels

    mount Sidekiq::Web, at: '/sidekiq'
  resources :learning_objects do
    member do
      post :like
    end
  end
  resources :subjects, only: [:index, :show]
  resources :users, only: [:show] do
    collection do
      get :me
    end
  end
  get 'users/:id', to: 'users#show', as: 'users_show'
  get '/faq' => 'welcome#faq'
  get '/contact' => 'welcome#contact', as: 'contact'
  get '/complaint' => 'welcome#complaint', as: 'complaint'
  get '/search' => 'search#index', as: 'search'
Ina's avatar
Ina committed
  get '/subject/:id' => 'welcome#subject', as:'subject_index'
Ina's avatar
Ina committed
  get '/collection' => 'welcome#collection'
Ina's avatar
Ina committed
  get '/login' => 'welcome#login'
  get '/account' => 'welcome#account'