summaryrefslogtreecommitdiff
path: root/users/config
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-12-08 16:05:40 +0100
committerAzul <azul@leap.se>2012-12-08 16:05:40 +0100
commit0f36c7931fe04bb3d6a3fd70a25fe1090f48e774 (patch)
tree705212a30f1487787abc8ccf345bc6e0566416e2 /users/config
parent8282b83c798ba4e5c1e26ec8243b82669b3ee6d4 (diff)
serve api version 1 in /1/
Just a very simple start for now. Do we want to use the api for the secure remote password auth from js?
Diffstat (limited to 'users/config')
-rw-r--r--users/config/routes.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/users/config/routes.rb b/users/config/routes.rb
index 1d144b4..6de216f 100644
--- a/users/config/routes.rb
+++ b/users/config/routes.rb
@@ -1,5 +1,10 @@
Rails.application.routes.draw do
+ scope "/1", :module => "V1", defaults: {format: 'json'} do
+ resources :sessions, :only => [:new, :create, :update, :destroy]
+ resources :users, :only => [:create]
+ end
+
get "login" => "sessions#new", :as => "login"
get "logout" => "sessions#destroy", :as => "logout"
resources :sessions, :only => [:new, :create, :update, :destroy]