From 404c391dfae6a47fa3342e461dec010da15d63a8 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Thu, 9 Jan 2025 13:23:11 -0800 Subject: [PATCH] fix seeding function --- src/repositories/ApiBasedRepository.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/repositories/ApiBasedRepository.ts b/src/repositories/ApiBasedRepository.ts index 6a24b7f..4ebf8eb 100644 --- a/src/repositories/ApiBasedRepository.ts +++ b/src/repositories/ApiBasedRepository.ts @@ -68,10 +68,9 @@ export class ApiBasedRepository implements GetterRepository { * @param systemId */ public async seedCacheForSystemId(systemId: string): Promise { - await this.getShuttlesBySystemId(systemId); - await this.getShuttlesByRouteId(systemId); - await this.getStopsBySystemId(systemId); - await this.getSystemById(systemId); + await this.updateShuttlesForSystemIfTTL(systemId); + await this.updateEtasForSystemIfTTL(systemId); + await this.updateStopsForSystemIdIfTTL(systemId); } public async getEtaForShuttleAndStopId(shuttleId: string, stopId: string): Promise {