summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/v1/services_controller.rb8
-rw-r--r--app/models/service_level.rb1
2 files changed, 9 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
diff --git a/app/models/service_level.rb b/app/models/service_level.rb
index 299aaf1..31a713b 100644
--- a/app/models/service_level.rb
+++ b/app/models/service_level.rb
@@ -16,4 +16,5 @@ class ServiceLevel
APP_CONFIG[:service_levels][@id]
end
+ delegate :to_json, to: :config_hash
end