adding post actions for item resource

parent de50a7f4
......@@ -44,6 +44,21 @@ module Dspace
handler(200, 201, 204) { |response| true }
end
action :add_metadata, 'POST /rest/items/:id/metadata' do
body { |objects| Dspace::Builders::HashBuilder.models2hash(objects) }
handler(200, 201) { |response| true }
end
action :add_bitstream, 'POST /rest/items/:id/bitstreams' do
body { |object| JSON.generate(object.to_h) }
handler(200, 201) { |response| true }
end
action :update_metadata, 'PUT /rest/items/:id/metadata' do
body { |object| JSON.generate(object.to_h) }
handler(200, 201) { |response| true }
end
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment