Skip to content

Commit

Permalink
[Fix] Use Only Relevant Routes
Browse files Browse the repository at this point in the history
How: filter the routes date when we get them from backend
Why: it fixes stop duplication and don't use yesterday routes
  • Loading branch information
ArkadiK94 committed Nov 25, 2023
1 parent 7a400cb commit dbcfad5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/api/gtfsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export async function getRoutesAsync(
})
const routes = Object.values(
gtfsRoutes
.filter((route) => route.date.getDate() === toTimestamp.date())
.map((route) => fromGtfsRoute(route))
.reduce((agg, line) => {
const groupByKey = line.key
Expand Down

0 comments on commit dbcfad5

Please sign in to comment.