From e4b4683b60e185942d36d5552bb5daa44df1e98a Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Wed, 22 Jan 2025 13:41:17 -0800 Subject: [PATCH] change update helper methods back to protected --- src/loaders/ApiBasedRepositoryLoader.ts | 8 +++----- test/jsonSnapshots/getAllSystemsResponse.ts | 0 2 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 test/jsonSnapshots/getAllSystemsResponse.ts diff --git a/src/loaders/ApiBasedRepositoryLoader.ts b/src/loaders/ApiBasedRepositoryLoader.ts index b9b9cd2..145639a 100644 --- a/src/loaders/ApiBasedRepositoryLoader.ts +++ b/src/loaders/ApiBasedRepositoryLoader.ts @@ -144,8 +144,6 @@ export class ApiBasedRepositoryLoader { } public async fetchAndUpdateEtaDataForExistingOrderedStops() { - // TODO implement once I figure out how to associate ETA data with shuttles - const systems = await this.repository.getSystems() await Promise.all(systems.map(async (system: ISystem) => { const stops = await this.repository.getStopsBySystemId(system.id); @@ -181,7 +179,7 @@ export class ApiBasedRepositoryLoader { })) } - public async updateStopDataForSystemAndApiResponse(system: ISystem, json: any) { + protected async updateStopDataForSystemAndApiResponse(system: ISystem, json: any) { if (json.stops) { const jsonStops = Object.values(json.stops); @@ -201,7 +199,7 @@ export class ApiBasedRepositoryLoader { } } - public async updateOrderedStopDataForExistingStops(json: any) { + protected async updateOrderedStopDataForExistingStops(json: any) { if (json.routes) { await Promise.all(Object.keys(json.routes).map(async (routeId) => { const jsonOrderedStopData: any[][] = json.routes[routeId].slice(2); @@ -246,7 +244,7 @@ export class ApiBasedRepositoryLoader { } } - public async updatePolylineDataForExistingRoutesAndApiResponse(json: any) { + protected async updatePolylineDataForExistingRoutesAndApiResponse(json: any) { if (json.routePoints) { await Promise.all(Object.keys(json.routePoints).map(async (routeId) => { const routePoints = json.routePoints[routeId][0]; diff --git a/test/jsonSnapshots/getAllSystemsResponse.ts b/test/jsonSnapshots/getAllSystemsResponse.ts new file mode 100644 index 0000000..e69de29