extract method to update shuttle data

This commit is contained in:
2025-01-07 21:11:53 -08:00
parent c869091fff
commit 16c6f48a1d

View File

@@ -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;
}