summaryrefslogtreecommitdiff
path: root/users/config/routes.rb
blob: 723d7371c4215a6c3f7b81b280119413e025ff2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Rails.application.routes.draw do

  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"
  get "logout" => "sessions#destroy", :as => "logout"
  resources :sessions, :only => [:new, :create, :update, :destroy]

  get "signup" => "users#new", :as => "signup"
  resources :users do
    resources :email_aliases, :only => [:destroy], :id => /.*/
  end

end