When returning the possible itineraries to user, the response should also contain information like:
Total distance
Total time spent
Average rating
Number of visited places
Also in this PR I refactored the code to be reusable and named better the variables.
I observed that for the last place in the itinerary the distance and the duration to next place (which is none in most cases, but not when we need to return to where we parked the car) were wrong set so I fixed this bug!
When returning the possible itineraries to user, the response should also contain information like:
Also in this PR I refactored the code to be reusable and named better the variables.
I observed that for the last place in the itinerary the
distance
and theduration
to next place (which is none in most cases, but not when we need to return to where we parked the car) were wrong set so I fixed this bug!