mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
rename ISystem to IPassioSystem
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ShuttleGetterSetterRepository } from "../repositories/ShuttleGetterSetterRepository";
|
||||
import { IEntityWithId, IEta, IRoute, IShuttle, IStop, ISystem } from "../entities/entities";
|
||||
import { IEntityWithId, IEta, IRoute, IShuttle, IStop, IPassioSystem } from "../entities/entities";
|
||||
import { ShuttleRepositoryLoader } from "./ShuttleRepositoryLoader";
|
||||
|
||||
export class ApiResponseError extends Error {
|
||||
@@ -52,7 +52,7 @@ export class ApiBasedShuttleRepositoryLoader implements ShuttleRepositoryLoader
|
||||
// filter down to supported systems
|
||||
const filteredSystem = json.all.find((jsonSystem: any) => jsonSystem.id === this.systemId);
|
||||
if (filteredSystem !== undefined) {
|
||||
const constructedSystem: ISystem = {
|
||||
const constructedSystem: IPassioSystem = {
|
||||
id: filteredSystem.id,
|
||||
name: filteredSystem.fullname,
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Mock data
|
||||
import { IEta, IOrderedStop, IRoute, IShuttle, IStop, ISystem } from "../entities/entities";
|
||||
import { IEta, IOrderedStop, IRoute, IShuttle, IStop, IPassioSystem } from "../entities/entities";
|
||||
import { ShuttleGetterSetterRepository } from "../repositories/ShuttleGetterSetterRepository";
|
||||
|
||||
const systems: ISystem[] = [
|
||||
const systems: IPassioSystem[] = [
|
||||
{
|
||||
id: "1",
|
||||
name: "Chapman University",
|
||||
@@ -4455,9 +4455,6 @@ const etas: IEta[] = [
|
||||
];
|
||||
|
||||
export async function loadShuttleTestData(repository: ShuttleGetterSetterRepository) {
|
||||
await Promise.all(systems.map(async (system) => {
|
||||
await repository.updateSystem(system);
|
||||
}));
|
||||
await Promise.all(routes.map(async (route) => {
|
||||
await repository.addOrUpdateRoute(route);
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user