Closed AndreiD closed 6 years ago
the current tariff json response is GET http://localhost:3000/api/store/tariffs/0x73d008c9d78109c95c54b936c56b3cdc7ca8252e
{ "666": { "id": "666", "currency": "EUR", "elements": [ { "priceComponents": { "type": "FLAT", "price": 1.2 }, "restrictions": {} } ], "last_updated": "2018-08-06T10:38:32.413Z" } }
however I cannot parse it like this. since I don't know from the start the ID (?)
I think it should be something similar to this (transformed it into json array, and removed the id key)
[ { "id": "666", "currency": "EUR", "elements": [ { "priceComponents": { "type": "FLAT", "price": 1.2 }, "restrictions": {} } ], "last_updated": "2018-08-06T10:38:32.413Z" } ]
I have added a url parameter:
GET http://localhost:3000/api/store/tariffs/0x73d008c9d78109c95c54b936c56b3cdc7ca8252e?raw=true
Will return the object as it is added in IPFS without any deserialization.
fixed now
the current tariff json response is GET http://localhost:3000/api/store/tariffs/0x73d008c9d78109c95c54b936c56b3cdc7ca8252e
however I cannot parse it like this. since I don't know from the start the ID (?)
I think it should be something similar to this (transformed it into json array, and removed the id key)