srslie / ar-travel-tracker

Turing School - Mod 2 - Final Project
0 stars 0 forks source link

Bug: Data Refresh #15

Closed srslie closed 3 years ago

srslie commented 3 years ago

What

After posting a new booking, running to duplication error in arrays and not showing the investment for the user. Not properly returning fetch gets after the fetch post.

FIX

Tried setting the arrays to empty before the post, returning the Promise.resolve or Promise.all, logging in the APIs and instantiation.

srslie commented 3 years ago

Fixed this after discussion with @sschipke--turns out I needed to have a 'return fetch' in my functions to make those promises get returned, in order to have them get resolved. Also figured a way to cut down on the information recalled, just returning the Post response.