Newer
Older
Rails.application.routes.draw do
namespace :auth do
mount_devise_token_auth_for 'User', skip: [:omniauth_callbacks]
end
namespace :management do
root 'welcome#index'
resource :complaints, except: ['create']
resources :institutions do
member do
post '/user/:user_id', as: :add_user, action: :add_user
delete '/user/:user_id', as: :remove_user, action: :remove_user
end
end
resources :highlights
resources :carousels
resources :statistics do
collection do
get :users
get :collections
get :accesses
resources :users do
resource :admin, only: [:create, :destroy]
resource :curator, only: [:create, :destroy]
member do
post :change_roles
end
collection do
get :curators
get :admins
end
end
Mauricio Giacomini Girardello
committed
end
Mauricio Giacomini Girardello
committed
root 'welcome#index'
resources :subjects, only: [:index, :show]
resource :complaints, only: ['create']
resources :institutions do
member do
get :users
end
end
resources :learning_objects do
member do
post :like
post :bookmarks
Mauricio Giacomini Girardello
committed
get :collections
# collection list
get '/collections/list' => "collections#list", as: 'collection_list'
resources :collections do
# add/remove a learning object for some collection
post '/add', as: :add_learning_object, action: :add_learning_object
delete '/remove', as: :remove_learning_object, action: :remove_learning_object
# copy / move learning objects from a collection to another
post '/copy', as: :copy_learning_objects, action: :copy_learning_objects
post '/move', as: :move_learning_objects, action: :move_learning_objects
Mauricio Giacomini Girardello
committed
end
end
Mauricio Giacomini Girardello
committed
get '/users/list' => 'users#list', as: :list_all_users
resources :users, only: [:show] do
collection do
get :me
end
end
get '/search' => 'search#index', as: 'search'
get '/search/fetch' => 'search#fetch', as: 'search_fetch'
get '/autocomplete' => 'search#autocomplete'
Mauricio Giacomini Girardello
committed
get '/subject/:id' => 'welcome#subject', as: 'subject_index'
get '/follow_collection' => 'welcome#follow_collection'
get '/file_outside_user' => 'welcome#file_outside_user'