AliHussain-arch / react-jukebox-front-end-lab

0 stars 0 forks source link

HW Feedback - Done #1

Open zeemohamed7 opened 2 months ago

zeemohamed7 commented 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);
  }
};`
AliHussain-arch commented 2 months ago

🔎

AliHussain-arch commented 2 months ago

It seems that I forgot to remove it after testing.

AliHussain-arch commented 2 months ago

Fixed it