nss-evening-cohort-26 / FE-Hackathon-music-streaming-project

2 stars 0 forks source link

Issue with creating a playlist #27

Closed yarelismartin closed 5 months ago

yarelismartin commented 5 months ago

Description

When submitting the create form the new playlist does not appear and is not in the array of playlists.

image I got this error and checked the network tab in dev tools which mentioned "Required parameter "int userId" was not provided from query string." so I made this change the handle submit:

const payload = { ...formInput };
      createPlaylist(payload, user.id)?.then(router.push('/playlists'));

originally it was:

 const payload = { ...formInput, userId: user.id };
      createPlaylist(payload).then(router.push('/playlists'));

regardless I still have the same error. Wanted to see if you guys could take a look at this and give me your input.

How Can This Be Tested?

Go to the playlists section in navbar and click on add a playlist btn.

Types of changes