summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-04-17 11:42:13 +0200
committerAzul <azul@leap.se>2014-04-17 11:42:13 +0200
commit8cc5ba134f6c5a1a06d91407aa78b962545c54ac (patch)
tree889e33e956ff52bb9246ae1e866b4ba131d20bae /app/controllers
parent3513ad74f950b113af1ba1e3d06bc6a55c48fde5 (diff)
initial commit for the service level api
:api/service will return a hash of the current users service level This is failiing if the user is not logged in. Instead it should return the service description for an anonymous user.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/v1/services_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/v1/services_controller.rb b/app/controllers/v1/services_controller.rb
new file mode 100644
index 0000000..594940e
--- /dev/null
+++ b/app/controllers/v1/services_controller.rb
@@ -0,0 +1,8 @@
+class V1::ServicesController < ApplicationController
+
+ respond_to :json
+
+ def show
+ respond_with current_user.effective_service_level
+ end
+end