mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
rename methods in getter repository
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user