hack4impact-uiuc / 7000-languages

Helping Indigenous communities around the world teach, learn and sustain their languages
GNU General Public License v3.0
12 stars 2 forks source link

Fixed client side audio and image api functions #262

Closed chenfeiyu132 closed 2 years ago

chenfeiyu132 commented 2 years ago

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 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)