From 517ecba7b6dc17b685b88279b375d701f091ea87 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Mon, 7 Aug 2023 10:28:21 +0100 Subject: [PATCH] Add via field to staffLDB.TrainServices.Origin/Destination fields Signed-off-by: Fred Boniface --- package.json | 2 +- src/utils/translators/ldb/staffStation.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 28e5b0a..4cb7371 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "zlib": "^1.0.5" }, "devDependencies": { - "@owlboard/ts-types": "^0.0.6", + "@owlboard/ts-types": "^0.0.7", "@types/jest": "^29.5.3", "eslint": "^8.39.0", "jest": "^29.6.2", diff --git a/src/utils/translators/ldb/staffStation.ts b/src/utils/translators/ldb/staffStation.ts index 6f217fb..1260519 100644 --- a/src/utils/translators/ldb/staffStation.ts +++ b/src/utils/translators/ldb/staffStation.ts @@ -99,6 +99,9 @@ function transformLocation(input: any): ServiceLocation[] { tiploc: item?.tiploc, name: item?.locationName } + if (item?.via) { + location.via = item.via + } output.push(location) } return output