Skip to content
Snippets Groups Projects
routes.rb 1.05 KiB
Newer Older
Rails.application.routes.draw do
  devise_for :users
  namespace :auth do
    mount_devise_token_auth_for 'User', skip: [:omniauth_callbacks]
  end
  namespace :management do
    root 'welcome#index'

    # statistics
    get 'statistics/', to: 'statistics#index', as: 'index_statistics'
    get 'statistics/users/' => 'statistics#users', as: 'users_statistics'
    get 'statistics/collections' => 'statistics#collections', as: 'collections_statistics'
    get 'statistics/accesses' => 'statistics#accesses', as: 'accesses_statistics'
    get 'statistics/downloads' => 'statistics#downloads', as: 'downloads_statistics'
  resources :learning_objects
  post '/learning_objects/:id/like' => 'learning_objects#like', as: 'like_learning_object'
  get '/faq' => 'welcome#faq'
  get '/contact' => 'welcome#contact', as: 'contact'
  get '/complaint' => 'welcome#complaint', as: 'complaint'
  get '/search' => 'search/solr#search', as: 'search'