summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/config/routes.rb b/config/routes.rb
index ce4c028..1fb9d7a 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,14 @@
Gemeinschaft42c::Application.routes.draw do
+ namespace :api, defaults: {format: 'json'} do
+ namespace :v1 do
+ resources :switchboards, :only => [:show, :index]
+ resources :switchboard_entries, :only => [:show, :index]
+ resources :sip_accounts, :only => [:show, :index]
+ resources :phone_numbers, :only => [:show, :index]
+ end
+
+ resources :rows
+ end
resources :voicemail_accounts do
resources :voicemail_settings
@@ -10,8 +20,6 @@ Gemeinschaft42c::Application.routes.draw do
end
end
- resources :switchboard_entries, :only => [:show, :index]
-
resources :restore_jobs
resources :groups do
@@ -64,9 +72,6 @@ Gemeinschaft42c::Application.routes.draw do
resources :gui_functions
- namespace :api do
- resources :rows
- end
resources :phone_numbers, :only => [:sort] do
collection { post :sort }