Skip to content

Commit

Permalink
include Rail&Fly "flights" in connections search
Browse files Browse the repository at this point in the history
  • Loading branch information
its-felix committed Oct 25, 2024
1 parent 1e33e7a commit f3f0db6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion go/api/search/connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ func findConnections(ctx context.Context, flightsByDeparture map[common.Departur
}

for _, f := range flightsByDeparture[d] {
if f.ServiceType != "J" || f.Duration() > maxDuration || f.DepartureTime.Compare(minDeparture) < 0 || f.DepartureTime.Compare(maxDeparture) > 0 {
// J = regular flight
// U = Rail&Fly
if (f.ServiceType != "J" && f.ServiceType != "U") || f.Duration() > maxDuration || f.DepartureTime.Compare(minDeparture) < 0 || f.DepartureTime.Compare(maxDeparture) > 0 {
continue
}

Expand Down

0 comments on commit f3f0db6

Please sign in to comment.