diff options
author | John Keiser <jkeiser@opscode.com> | 2014-04-18 13:20:40 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2014-04-18 13:20:40 -0700 |
commit | e655c7857e9568ece4555e627fc7d3aa372449ae (patch) | |
tree | 9bff58e253d7e5150d61d4dc6ba7de02cf475335 /lib/chef_zero/endpoints/principal_endpoint.rb | |
parent | d66376d5a813fe11a6272ce890fd36bfd32ca0db (diff) | |
download | chef-zero-e655c7857e9568ece4555e627fc7d3aa372449ae.tar.gz |
Add support for "/organizations/chef" prefix
Diffstat (limited to 'lib/chef_zero/endpoints/principal_endpoint.rb')
-rw-r--r-- | lib/chef_zero/endpoints/principal_endpoint.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef_zero/endpoints/principal_endpoint.rb b/lib/chef_zero/endpoints/principal_endpoint.rb index dde9219..2398334 100644 --- a/lib/chef_zero/endpoints/principal_endpoint.rb +++ b/lib/chef_zero/endpoints/principal_endpoint.rb @@ -8,11 +8,11 @@ module ChefZero class PrincipalEndpoint < RestBase def get(request) name = request.rest_path[-1] - json = get_data(request, [ 'users', name ], :nil) + json = get_data(request, request.rest_path[0..1] + [ 'users', name ], :nil) if json type = 'user' else - json = get_data(request, [ 'clients', name ], :nil) + json = get_data(request, request.rest_path[0..1] + [ 'clients', name ], :nil) type = 'client' end if json |