Commit 3d306035 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

adding collection resources

parent 9690481e
module Dspace
module Resources
class CollectionResource < ResourceKit::Resource
resources do
default_handler(401) { raise NotAuthorizedError, 'This request requires authentication' }
action :all, 'GET /rest/collections' do
query_keys :expand
handler(200) do |response|
Dspace::Builders::ModelBuilder.build_collections(JSON.parse(response.body))
end
end
end
end
end
end
\ No newline at end of file
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