summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2014-08-21 21:03:50 -0700
committerJohn Keiser <jkeiser@opscode.com>2014-08-22 09:20:51 -0700
commit4c355c78a6ccfb888d557d3b96cc268edc7a7fb4 (patch)
treedb2ae0833f443c2e202a2429e75fcaace6c91cdd /lib/chef_zero/endpoints
parent43c0e4494bb044153a21edceacfc438443c632f6 (diff)
downloadchef-zero-4c355c78a6ccfb888d557d3b96cc268edc7a7fb4.tar.gz
Simplify
Diffstat (limited to 'lib/chef_zero/endpoints')
-rw-r--r--lib/chef_zero/endpoints/cookbook_version_endpoint.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef_zero/endpoints/cookbook_version_endpoint.rb b/lib/chef_zero/endpoints/cookbook_version_endpoint.rb
index db33d12..f1cc22f 100644
--- a/lib/chef_zero/endpoints/cookbook_version_endpoint.rb
+++ b/lib/chef_zero/endpoints/cookbook_version_endpoint.rb
@@ -6,7 +6,7 @@ require 'chef_zero/data_store/data_not_found_error'
module ChefZero
module Endpoints
- # /cookbooks/NAME/VERSION
+ # /organizations/ORG/cookbooks/NAME/VERSION
class CookbookVersionEndpoint < RestObjectEndpoint
def get(request)
if request.rest_path[4] == "_latest" || request.rest_path[4] == "latest"
@@ -37,7 +37,7 @@ module ChefZero
end
# Set the cookbook
- set_data(request, request.rest_path[0..1] + ['cookbooks', name, version], request.body, :create_dir, :create)
+ set_data(request, request.rest_path, request.body, :create_dir, :create)
# If the cookbook was updated, check for deleted files and clean them up
if existing_cookbook