diff --git a/src/repositories/ApiBasedRepository.ts b/src/repositories/ApiBasedRepository.ts index 2aee8d4..17af7d3 100644 --- a/src/repositories/ApiBasedRepository.ts +++ b/src/repositories/ApiBasedRepository.ts @@ -129,7 +129,7 @@ export class ApiBasedRepository implements GetterRepository { } // Otherwise, call getShuttlesBySystemId to update the data - await this.getShuttlesBySystemId(shuttle.systemId); + await this.updateShuttlesForSystemIfTTL(shuttle.systemId); shuttle = this.cache.shuttleByShuttleId[shuttleId]; if (!shuttle) return null; @@ -144,6 +144,11 @@ export class ApiBasedRepository implements GetterRepository { return Promise.resolve([]); } + public async updateShuttlesForSystemIfTTL(systemId: string) { + // Update shuttleByShuttleId, shuttlesBySystemId, shuttlesByRouteId (future) + + } + public async getStopById(stopId: string): Promise<| null> { return null; }