Improve passenger pickup/drop handling
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 3m8s
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 3m8s
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"git.coopgo.io/coopgo-platform/carpool-service/interoperability/ocss"
|
||||
"github.com/paulmach/orb"
|
||||
"github.com/paulmach/orb/geojson"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
@@ -13,6 +14,10 @@ func (s *OCSSApiService) GetDriverJourneys(ctx context.Context, departureLat flo
|
||||
departure := orb.Point{departureLng, departureLat}
|
||||
arrival := orb.Point{arrivalLng, arrivalLat}
|
||||
|
||||
// Create features for the handler (OCSS doesn't provide addresses, so they'll be empty)
|
||||
departureFeature := geojson.NewFeature(departure)
|
||||
arrivalFeature := geojson.NewFeature(arrival)
|
||||
|
||||
td := 900 * time.Second
|
||||
if timeDelta != nil {
|
||||
td = *timeDelta
|
||||
@@ -21,7 +26,7 @@ func (s *OCSSApiService) GetDriverJourneys(ctx context.Context, departureLat flo
|
||||
minDate := departureDate.Add(-td * time.Second)
|
||||
maxDate := departureDate.Add(td * time.Second)
|
||||
|
||||
journeys, err := s.Handler.GetDriverJourneys(departure, arrival, departureRadius, arrivalRadius, minDate, maxDate, count)
|
||||
journeys, err := s.Handler.GetDriverJourneys(departureFeature, arrivalFeature, departureRadius, arrivalRadius, minDate, maxDate, count)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user