Adding Multiple Movies to Single Rental

Hello there,

the vidly app allows us to make a rental with one single movie, how would I modify the post request in the rentals.js route to allow 1 rental to have multiple movies.

Screenshot 2021-02-28 at 22.49.50

for example in the code above have a movies array with multiple movie objects.

Thanks in advance!

In your code i don’t see any movies array, I only see that you created a Rental object and inside it there are two more objects customer & movie