summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb
index c455dd7..e370aa4 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -26,9 +26,10 @@ LeapWeb::Application.routes.draw do
namespace "api", { module: "v1",
path: "/1/",
- defaults: {format: 'json'} } do
- resources :sessions, :only => [:new, :create, :update],
+ defaults: {format: 'json'},
:constraints => { :id => /[^\/]+(?=\.json\z)|[^\/]+/ }
+ } do
+ resources :sessions, :only => [:new, :create, :update]
delete "logout" => "sessions#destroy", :as => "logout"
resources :users, :only => [:create, :update, :destroy, :index, :show]
resources :messages, :only => [:index, :update]