diff --git a/src/services/trainService.services.js b/src/services/trainService.services.js index ced4991..037eb5d 100644 --- a/src/services/trainService.services.js +++ b/src/services/trainService.services.js @@ -20,6 +20,16 @@ async function findByHeadcode(headcode) { const trainData = db.query('timetable', query); return trainData; // Use pis.findByTiplocArray() to return a PIS code alongside the data // eg. {trainData: {}, pis:5001} + // Will need to do something like: + /* for i in trainData { + let tiplocArray = [] + for ii in i['stops'] { + get TIPLOC + push TIPLOC to tiplocArray + } + const pis = pis.findByTiplocArray(tiplocArray) + } + */ } module.exports = {