re-order config/routes.rb
This commit is contained in:
parent
5b9eedc830
commit
c1acaba941
1 changed files with 43 additions and 40 deletions
|
@ -12,6 +12,49 @@ Metamaps::Application.routes.draw do
|
|||
get :synapses
|
||||
end
|
||||
|
||||
namespace :explore do
|
||||
get 'active'
|
||||
get 'featured'
|
||||
get 'mine'
|
||||
get 'shared'
|
||||
get 'starred'
|
||||
get 'mapper/:id', action: 'mapper'
|
||||
end
|
||||
|
||||
resources :maps, except: [:index, :edit] do
|
||||
member do
|
||||
get :export
|
||||
post 'events/:event', action: :events
|
||||
get :contains
|
||||
post :upload_screenshot, action: :screenshot
|
||||
post :access, default: { format: :json }
|
||||
post :star, to: 'stars#create', defaults: { format: :json }
|
||||
post :unstar, to: 'stars#destroy', defaults: { format: :json }
|
||||
end
|
||||
end
|
||||
|
||||
resources :mappings, except: [:index, :new, :edit]
|
||||
|
||||
resources :messages, only: [:show, :create, :update, :destroy]
|
||||
|
||||
resources :metacode_sets, except: [:show]
|
||||
|
||||
resources :metacodes, except: [:destroy]
|
||||
get 'metacodes/:name', to: 'metacodes#show'
|
||||
|
||||
resources :synapses, except: [:index, :new, :edit]
|
||||
|
||||
resources :topics, except: [:index, :new, :edit] do
|
||||
get :autocomplete_topic, on: :collection
|
||||
end
|
||||
get 'topics/:id/network', to: 'topics#network', as: :network
|
||||
get 'topics/:id/relative_numbers', to: 'topics#relative_numbers', as: :relative_numbers
|
||||
get 'topics/:id/relatives', to: 'topics#relatives', as: :relatives
|
||||
|
||||
resources :users, except: [:index, :destroy]
|
||||
get 'users/:id/details', to: 'users#details', as: :details
|
||||
post 'user/updatemetacodes', to: 'users#updatemetacodes', as: :updatemetacodes
|
||||
|
||||
namespace :api, path: '/api', default: { format: :json } do
|
||||
namespace :v2, path: '/v2' do
|
||||
resources :maps, only: [:index, :create, :show, :update, :destroy]
|
||||
|
@ -35,42 +78,6 @@ Metamaps::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
resources :messages, only: [:show, :create, :update, :destroy]
|
||||
resources :mappings, except: [:index, :new, :edit]
|
||||
resources :metacode_sets, except: [:show]
|
||||
|
||||
resources :metacodes, except: [:destroy]
|
||||
get 'metacodes/:name', to: 'metacodes#show'
|
||||
|
||||
resources :synapses, except: [:index, :new, :edit]
|
||||
resources :topics, except: [:index, :new, :edit] do
|
||||
get :autocomplete_topic, on: :collection
|
||||
end
|
||||
get 'topics/:id/network', to: 'topics#network', as: :network
|
||||
get 'topics/:id/relative_numbers', to: 'topics#relative_numbers', as: :relative_numbers
|
||||
get 'topics/:id/relatives', to: 'topics#relatives', as: :relatives
|
||||
|
||||
resources :maps, except: [:index, :edit] do
|
||||
member do
|
||||
get :export
|
||||
post 'events/:event', action: :events
|
||||
get :contains
|
||||
post :upload_screenshot, action: :screenshot
|
||||
post :access, default: { format: :json }
|
||||
post :star, to: 'stars#create', defaults: { format: :json }
|
||||
post :unstar, to: 'stars#destroy', defaults: { format: :json }
|
||||
end
|
||||
end
|
||||
|
||||
namespace :explore do
|
||||
get 'active'
|
||||
get 'featured'
|
||||
get 'mine'
|
||||
get 'shared'
|
||||
get 'starred'
|
||||
get 'mapper/:id', action: 'mapper'
|
||||
end
|
||||
|
||||
devise_for :users, skip: :sessions, controllers: {
|
||||
registrations: 'users/registrations',
|
||||
passwords: 'users/passwords',
|
||||
|
@ -84,10 +91,6 @@ Metamaps::Application.routes.draw do
|
|||
get 'join' => 'devise/registrations#new', :as => :new_user_registration_path
|
||||
end
|
||||
|
||||
get 'users/:id/details', to: 'users#details', as: :details
|
||||
post 'user/updatemetacodes', to: 'users#updatemetacodes', as: :updatemetacodes
|
||||
resources :users, except: [:index, :destroy]
|
||||
|
||||
namespace :hacks do
|
||||
get 'load_url_title'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue