From d2314e0d401e54fce5e5c3d5866fd8b7e1d733f6 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Thu, 21 May 2020 22:28:38 +0200 Subject: [PATCH] journeys: don't send outDate/outTime & ctxScr --- index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 3f8274f5..d344a15d 100644 --- a/index.js +++ b/index.js @@ -182,9 +182,6 @@ const createClient = (profile, userAgent, opt = {}) => { let earlierRef = null, laterRef = null const more = (when, journeysRef) => { const query = { - outDate: profile.formatDate(profile, when), - outTime: profile.formatTime(profile, when), - ctxScr: journeysRef, getPasslist: !!opt.stopovers, maxChg: opt.transfers, minChgTime: opt.transferTime, @@ -204,6 +201,11 @@ const createClient = (profile, userAgent, opt = {}) => { // todo: `getConGroups: false` what is this? // todo: what is getEco, fwrd? } + if (journeysRef) query.ctxScr = journeysRef + else { + query.outDate = profile.formatDate(profile, when) + query.outTime = profile.formatTime(profile, when) + } if (profile.journeysNumF && opt.results !== null) query.numF = opt.results if (profile.journeysOutFrwd) query.outFrwd = outFrwd