diff --git a/src/services/ldb.services.js b/src/services/ldb.services.js index 670a9a6..f248372 100644 --- a/src/services/ldb.services.js +++ b/src/services/ldb.services.js @@ -6,7 +6,7 @@ const util = require('../utils/ldb.utils'); const san = require('../utils/sanitizer.utils'); const db = require('../services/dbAccess.services'); -//import { transform as staffStationTransform } from '../utils/translators/ldb/staffStation'; +import { transform as staffStationTransform } from '../utils/translators/ldb/staffStation'; const ldbKey = process.env.OWL_LDB_KEY; const ldbsvKey = process.env.OWL_LDB_SVKEY; @@ -65,7 +65,14 @@ async function arrDepBoardStaff(CRS) { services: 'PBS' }; const api = new ldb(ldbsvKey,true); - return await api.call('GetArrivalDepartureBoardByCRS',options,false,false); + const result = await api.call('GetArrivalDepartureBoardByCRS',options,false,false); + try { + const transformationTest = staffStationTransform(result) + console.log("Transformation Test Successful") + } catch (err) { + console.log("Transformation Test Failed: " + err) + } + return result } catch (err) { log.out(`ldbService.arrDepBoardStaff: Lookup Failed for: ${CRS}`, 'warn'); log.out(`ldbService.arrDepBoardStaff: ${err}`);