diff options
Diffstat (limited to 'users/config/routes.rb')
-rw-r--r-- | users/config/routes.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/users/config/routes.rb b/users/config/routes.rb index 8985502..723d737 100644 --- a/users/config/routes.rb +++ b/users/config/routes.rb @@ -1,8 +1,12 @@ Rails.application.routes.draw do - scope "/1", :module => "V1", defaults: {format: 'json'} do - resources :sessions, :only => [:new, :create, :update, :destroy] - resources :users, :only => [:create] + constraints :subdomain => "api" do + namespace "api", :path => nil do + scope "/1", :module => "V1", defaults: {format: 'json'} do + resources :sessions, :only => [:new, :create, :update, :destroy] + resources :users, :only => [:create] + end + end end get "login" => "sessions#new", :as => "login" |