blob: 9f692682eb9b2caf8b3d3e0b782f12f767862fd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
require_relative "../rest_base"
module ChefZero
module Endpoints
# The minimum amount of S3 necessary to support cookbook upload/download
# /organizations/NAME/file_store/FILE
class FileStoreFileEndpoint < RestBase
def json_only
false
end
def get(request)
[200, { "Content-Type" => "application/x-binary" }, get_data(request) ]
end
def put(request)
data_store.set(request.rest_path, request.body, :create, :create_dir, requestor: request.requestor)
json_response(200, {})
end
end
end
end
|