mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
change update helper methods back to protected
This commit is contained in:
@@ -144,8 +144,6 @@ export class ApiBasedRepositoryLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async fetchAndUpdateEtaDataForExistingOrderedStops() {
|
public async fetchAndUpdateEtaDataForExistingOrderedStops() {
|
||||||
// TODO implement once I figure out how to associate ETA data with shuttles
|
|
||||||
|
|
||||||
const systems = await this.repository.getSystems()
|
const systems = await this.repository.getSystems()
|
||||||
await Promise.all(systems.map(async (system: ISystem) => {
|
await Promise.all(systems.map(async (system: ISystem) => {
|
||||||
const stops = await this.repository.getStopsBySystemId(system.id);
|
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) {
|
if (json.stops) {
|
||||||
const jsonStops = Object.values(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) {
|
if (json.routes) {
|
||||||
await Promise.all(Object.keys(json.routes).map(async (routeId) => {
|
await Promise.all(Object.keys(json.routes).map(async (routeId) => {
|
||||||
const jsonOrderedStopData: any[][] = json.routes[routeId].slice(2);
|
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) {
|
if (json.routePoints) {
|
||||||
await Promise.all(Object.keys(json.routePoints).map(async (routeId) => {
|
await Promise.all(Object.keys(json.routePoints).map(async (routeId) => {
|
||||||
const routePoints = json.routePoints[routeId][0];
|
const routePoints = json.routePoints[routeId][0];
|
||||||
|
|||||||
0
test/jsonSnapshots/getAllSystemsResponse.ts
Normal file
0
test/jsonSnapshots/getAllSystemsResponse.ts
Normal file
Reference in New Issue
Block a user