Commit c9df490a authored by Bruno Nocera Zanette's avatar Bruno Nocera Zanette

fix bug: Create Community not returning a Community

parent 5a3cc322
......@@ -42,17 +42,17 @@ module Dspace
action :create, 'POST /rest/communities' do
body { |object| JSON.generate(object.to_h) }
handler(200, 201) { |response| true }
handler(200, 201) { |response| Dspace::Community.new(JSON.parse(response.body)) }
end
action :create_subcommunity, 'POST /rest/communities/:id/communities' do
body { |object| JSON.generate(object.to_h) }
handler(200, 201) { |response| true }
handler(200, 201) { |response| Dspace::Community.new(JSON.parse(response.body)) }
end
action :create_collection, 'POST /rest/communities/:id/collections' do
body { |object| JSON.generate(object.to_h) }
handler(200, 201) { |response| true }
handler(200, 201) { |response| Dspace::Collection.new(JSON.parse(response.body)) }
end
action :update, 'PUT /rest/communities/:id' do
......@@ -75,4 +75,4 @@ module Dspace
end
end
end
end
\ No newline at end of file
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