journeys: don't send outDate/outTime & ctxScr

This commit is contained in:
Jannis R 2020-05-21 22:28:38 +02:00 committed by Jannis Redmann
parent fea27d3a4a
commit d2314e0d40

View file

@ -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