Skip to content

Commit

Permalink
[Fix] Use Only Relevant Routes (#244)
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 authored Nov 26, 2023
1 parent ef2d027 commit c32d806
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 c32d806

Please sign in to comment.