summaryrefslogtreecommitdiff
path: root/app/controllers/api/v1/switchboards_controller.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-04-03 22:08:19 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-04-03 22:09:33 +0200
commitcea2cc3c1cc1e48fc4600c698d52dfda2bde4505 (patch)
treee216a9634c31047e8908a882aed9ff2545ed99e6 /app/controllers/api/v1/switchboards_controller.rb
parent64653a9149eca977c16233abb0a472730b94a464 (diff)
Massive changes to the switchboard.
Diffstat (limited to 'app/controllers/api/v1/switchboards_controller.rb')
-rw-r--r--app/controllers/api/v1/switchboards_controller.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/app/controllers/api/v1/switchboards_controller.rb b/app/controllers/api/v1/switchboards_controller.rb
new file mode 100644
index 0000000..e6996ca
--- /dev/null
+++ b/app/controllers/api/v1/switchboards_controller.rb
@@ -0,0 +1,21 @@
+module Api
+ module V1
+ class SwitchboardsController < ApplicationController
+ respond_to :json
+
+ def index
+ @user = current_user
+ @switchboards = @user.switchboards
+
+ respond_with @switchboards
+ end
+
+ def show
+ @user = current_user
+ @switchboard = @user.switchboards.find(params[:id])
+
+ respond_with @switchboard
+ end
+ end
+ end
+end