mobil.nrw refreshJourneys(): use outReconL[] instead of ctxRecon 🐛

This commit is contained in:
Jannis R 2021-01-10 20:45:37 +01:00 committed by Jannis Redmann
parent 3407ad6b5b
commit d017e62740
3 changed files with 16 additions and 7 deletions

View file

@ -4,15 +4,21 @@ const formatRefreshJourneyReq = (ctx, refreshToken) => {
// eslint-disable-next-line no-unused-vars
const {profile, opt} = ctx
const req = {
getIST: true, // todo: make an option
getPasslist: !!opt.stopovers,
getPolyline: !!opt.polylines,
getTariff: !!opt.tickets
}
if (profile.refreshJourneyUseOutReconL) {
req.outReconL = [{ctx: refreshToken}]
} else {
req.ctxRecon = refreshToken
}
return {
meth: 'Reconstruction',
req: {
ctxRecon: refreshToken,
getIST: true, // todo: make an option
getPasslist: !!opt.stopovers,
getPolyline: !!opt.polylines,
getTariff: !!opt.tickets
}
req,
}
}

View file

@ -108,6 +108,8 @@ const defaultProfile = {
trip: false,
radar: false,
refreshJourney: true,
// refreshJourney(): use `outReconL[]` instead of `ctxRecon`?
refreshJourneyUseOutReconL: false,
tripsByName: true,
remarks: true,
lines: true,

View file

@ -34,6 +34,7 @@ const cflProfile = {
trip: true,
radar: true,
reachableFrom: true,
refreshJourneyUseOutReconL: true,
remarks: true,
}