carlosvegap / capstone-kickoff

0 stars 0 forks source link

Refactor BackEnd for Adventurer on Update Preferences #66

Closed CarLosVegga closed 1 year ago

CarLosVegga commented 1 year ago

Hi everyone!

Happy to share this PR for another one of the 6 endpoints.

I previously had the update endpoint working. Most of the changes were related to format: moving the query to its folder, using the chaining property for the Parse Query, passing the username through headers and changing the way the front requests for the data.

I also found a small bug that didn't let me open the preferences page if I didn't pass through home. I discovered that with the new implementation, I made sure to call the function that retrieves all existing feedback in the Promise.all on Adventurer.jsx line 78. However, the intention was that if restaurants are not being used (like when you modify your preferences), that is not requested.

So, I also added the function that calls the feedback information on the conditional in that same file, where params.page != home

Thanks in advance for the feedback!!