27 lines
710 B
Ruby
27 lines
710 B
Ruby
Rails.application.routes.draw do
|
|
resources :vouchers
|
|
|
|
resources :comments
|
|
# 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 :articles do
|
|
resources :comments
|
|
end
|
|
end
|
|
|
|
resources :users
|
|
|
|
# ** TO DO ** #
|
|
# Pls activate again when you've made this more secure
|
|
# I dont think its a good idea to send passwords over plaintext
|
|
|
|
# resources :user_profiles
|
|
# post 'login', to: 'authentication#authenticate'
|
|
# post 'register', to: 'users#create'
|
|
# ** TODO ** #
|
|
end
|