Previously, we were doing JSON.parse to the response which is not necessary since we were already getting an object in the response. Additionally, the data was returned in res.data instead of res.body.
Secondly, the file type was not really needed from the client side since the API endpoint doesn't require it anymore(we look up the file type on the backend)
Status:
:rocket: Ready
Description
Previously, we were doing
JSON.parse
to the response which is not necessary since we were already getting an object in the response. Additionally, the data was returned inres.data
instead ofres.body
.Secondly, the file type was not really needed from the client side since the API endpoint doesn't require it anymore(we look up the file type on the backend)