vereto-api/config/routes.rb
2018-02-21 12:09:22 +00:00

18 lines
489 B
Ruby

Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
scope module: :v2, constraints: ApiVersion.new('v2') do
resources :articles
end
scope module: :v1, constraints: ApiVersion.new('v1', true) do
resources :todos do
resources :items
end
resources :articles
end
resources :users
post 'auth/login', to: 'authentication#authenticate'
post 'signup', to: 'users#create'
end