rename methods in getter repository

This commit is contained in:
2025-04-07 19:06:03 -07:00
parent 495a946e78
commit 0076d987ca
7 changed files with 49 additions and 46 deletions

View File

@@ -36,7 +36,7 @@ export class ApiBasedShuttleRepositoryLoader implements ShuttleRepositoryLoader
public async fetchAndUpdateRouteDataForSystem() {
const systemId = this.passioSystemId;
const routeIdsToPrune = await this.constructExistingEntityIdSet(async () => {
return await this.repository.getRoutesBySystemId(this.systemIdForConstructedData);
return await this.repository.getRoutes(this.systemIdForConstructedData);
});
const params = {
@@ -89,7 +89,7 @@ export class ApiBasedShuttleRepositoryLoader implements ShuttleRepositoryLoader
// Fetch from the API
// Pass JSON output into two different methods to update repository
const stopIdsToPrune = await this.constructExistingEntityIdSet(async () => {
return await this.repository.getStopsBySystemId(this.systemIdForConstructedData);
return await this.repository.getStops(this.systemIdForConstructedData);
});
const params = {
@@ -127,7 +127,7 @@ export class ApiBasedShuttleRepositoryLoader implements ShuttleRepositoryLoader
public async fetchAndUpdateShuttleDataForSystem() {
const systemId = this.passioSystemId;
const shuttleIdsToPrune = await this.constructExistingEntityIdSet(async () => {
return await this.repository.getShuttlesBySystemId(this.systemIdForConstructedData);
return await this.repository.getShuttles(this.systemIdForConstructedData);
});
const params = {
@@ -184,7 +184,7 @@ export class ApiBasedShuttleRepositoryLoader implements ShuttleRepositoryLoader
}
public async fetchAndUpdateEtaDataForExistingStopsForSystem() {
const stops = await this.repository.getStopsBySystemId(this.systemIdForConstructedData);
const stops = await this.repository.getStops(this.systemIdForConstructedData);
await Promise.all(stops.map(async (stop) => {
let stopId = stop.id;
await this.fetchAndUpdateEtaDataForStopId(stopId);