diff options
author | Azul <azul@riseup.net> | 2016-05-01 10:55:33 -0300 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-05-18 20:07:41 +0200 |
commit | e05a1b0f5ae40a2aa17976b3009cd563b8e4660a (patch) | |
tree | 77774fd7e70211febaf3a15c6e3b3e7340843c11 /config/routes.rb | |
parent | a1b494e334406660a1f49fb7de9b043493809640 (diff) |
api: allow version bumping - bump to 2
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb index be3b3be..a1a5b3c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -24,10 +24,10 @@ LeapWeb::Application.routes.draw do get '/provider.json' => 'static_config#provider' - namespace "api", { module: "v1", - path: "/1/", + namespace "api", { module: "api", + path: "/:version/", defaults: {format: 'json'}, - :constraints => { :id => /[^\/]+(?=\.json\z)|[^\/]+/ } + :constraints => { :id => /[^\/]+(?=\.json\z)|[^\/]+/, :version => /[12]/ } } do resources :sessions, :only => [:new, :create, :update] delete "logout" => "sessions#destroy", :as => "logout" |