There are no scheduled train services from this station
-diff --git a/UpNext.md b/UpNext.md index 43cdfaf..e96a50b 100644 --- a/UpNext.md +++ b/UpNext.md @@ -25,9 +25,9 @@ - "corpus": NLCDESC(TEXT) * Build metrics page * Responsive text sizes for boards. +* Undo changed to make everything an array - frontend code to handle this. +* Explore compression of API Responses ## Backend: -* Rewrite sanitizing functions to remove external dependancy. -* Undo changed to make everything an array - frontend code to handle this. -* Explore compression of API Responses \ No newline at end of file +* Rewrite sanitizing functions to remove external dependancy. \ No newline at end of file diff --git a/src/services/ldb.services.js b/src/services/ldb.services.js index 78ad6b1..0f1c9e0 100644 --- a/src/services/ldb.services.js +++ b/src/services/ldb.services.js @@ -28,29 +28,6 @@ async function get(body, id){ log.out(`ldbService.get: Error, Unable to find CRS: ${err}`) var data = {ERROR:'NOT_FOUND',description:'The entered station was not found. Please check and try again.'}; } - try { - if (data.GetStationBoardResult.nrccMessages) { - var msg = await util.cleanMessages(data.GetStationBoardResult.nrccMessages); - data.GetStationBoardResult.nrccMessages.message = msg; - } - if (data.GetStationBoardResult.trainServices && !Array.isArray(data.GetStationBoardResult.trainServices.service)) { - log.out(`ldbService.get: Transforming trainServices`) - var services = await util.cleanServices(data.GetStationBoardResult.trainServices.service) - data.GetStationBoardResult.trainServices.service = services; - } - if (data.GetStationBoardResult.ferryServices && !Array.isArray(data.GetStationBoardResult.ferryServices.service)) { - log.out(`ldbService.get: Transforming ferryServices`) - var services = await util.cleanServices(data.GetStationBoardResult.ferryServices.service) - data.GetStationBoardResult.ferryServices.service = services; - } - if (data.GetStationBoardResult.busServices && !Array.isArray(data.GetStationBoardResult.busServices.service)) { - log.out(`ldbService.get: Transforming busServices`) - var services = await util.cleanServices(data.GetStationBoardResult.busServices.service) - data.GetStationBoardResult.busServices.service = services; - } - } catch (err) { - log.out(`ldbService.get: Error transforming upstream data: ${err}`) - } return data; } diff --git a/static/board.html b/static/board.html index 79414ff..a5c1c04 100644 --- a/static/board.html +++ b/static/board.html @@ -60,9 +60,10 @@