summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints/user_organizations_endpoint.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef_zero/endpoints/user_organizations_endpoint.rb')
-rw-r--r--lib/chef_zero/endpoints/user_organizations_endpoint.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef_zero/endpoints/user_organizations_endpoint.rb b/lib/chef_zero/endpoints/user_organizations_endpoint.rb
index 3eb13c4..03eae68 100644
--- a/lib/chef_zero/endpoints/user_organizations_endpoint.rb
+++ b/lib/chef_zero/endpoints/user_organizations_endpoint.rb
@@ -1,5 +1,5 @@
-require 'ffi_yajl'
-require 'chef_zero/rest_base'
+require "ffi_yajl"
+require "chef_zero/rest_base"
module ChefZero
module Endpoints
@@ -7,11 +7,11 @@ module ChefZero
class UserOrganizationsEndpoint < RestBase
def get(request)
username = request.rest_path[1]
- result = list_data(request, [ 'organizations' ]).select do |orgname|
- exists_data?(request, [ 'organizations', orgname, 'users', username ])
+ result = list_data(request, [ "organizations" ]).select do |orgname|
+ exists_data?(request, [ "organizations", orgname, "users", username ])
end
result = result.map do |orgname|
- org = get_data(request, [ 'organizations', orgname, 'org' ])
+ org = get_data(request, [ "organizations", orgname, "org" ])
org = FFI_Yajl::Parser.parse(org, :create_additions => false)
{ "organization" => ChefData::DataNormalizer.normalize_organization(org, orgname) }
end