Adapt deserialization methods to new schema

This commit is contained in:
Thor77 2018-12-11 17:06:50 +01:00
parent 945c499de7
commit c38066408f
1 changed files with 1 additions and 7 deletions

View File

@ -2,12 +2,6 @@
module DeserializeHelpers
def deserialize_response(response)
ActiveModelSerializers::Deserialization.jsonapi_parse(JSON.parse(response.body))
end
def deserialize_list(response)
JSON.parse(response.body, symbolize_names: true)[:data].map do |raw_obj|
raw_obj[:attributes].merge raw_obj.except(:attributes)
end
JSON.parse(response.body, symbolize_names: true)
end
end