diff options
Diffstat (limited to 'lib/chef_zero/endpoints/organization_user_default_key_endpoint.rb')
-rw-r--r-- | lib/chef_zero/endpoints/organization_user_default_key_endpoint.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/chef_zero/endpoints/organization_user_default_key_endpoint.rb b/lib/chef_zero/endpoints/organization_user_default_key_endpoint.rb new file mode 100644 index 0000000..953edc1 --- /dev/null +++ b/lib/chef_zero/endpoints/organization_user_default_key_endpoint.rb @@ -0,0 +1,16 @@ +require 'chef_zero/rest_base' + +module ChefZero + module Endpoints + # GET /organizations/ORG/users/USER/keys/default + class OrganizationUserDefaultKeyEndpoint < RestBase + def get(request) + # 404 if it doesn't exist + get_data(request, request.rest_path[0..3]) + # Just use the /users/USER/keys/default endpoint + request.rest_path = request.rest_path[2..-1] + ActorDefaultKeyEndpoint.new(server).get(request) + end + end + end +end |