Open zeemohamed7 opened 2 months ago
https://github.com/AliHussain-arch/react-jukebox-front-end-lab/blob/2ade9413053ccc55dba0b8eda726e5fd4be47139/src/services/trackService.js#L52
Great job! However, your delete function should just render back the response like this:
try { const res = await fetch(`${BASE_URL}/${trackId}`, { method: 'DELETE', }); if (!res.ok) throw new Error('Failed to delete track.'); return res; } catch (error) { console.log(error); } };`
🔎
It seems that I forgot to remove it after testing.
Fixed it
https://github.com/AliHussain-arch/react-jukebox-front-end-lab/blob/2ade9413053ccc55dba0b8eda726e5fd4be47139/src/services/trackService.js#L52
Great job! However, your delete function should just render back the response like this: