mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
mobil.nrw refreshJourneys(): use outReconL[] instead of ctxRecon 🐛
This commit is contained in:
parent
3407ad6b5b
commit
d017e62740
3 changed files with 16 additions and 7 deletions
|
@ -4,15 +4,21 @@ const formatRefreshJourneyReq = (ctx, refreshToken) => {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const {profile, opt} = ctx
|
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 {
|
return {
|
||||||
meth: 'Reconstruction',
|
meth: 'Reconstruction',
|
||||||
req: {
|
req,
|
||||||
ctxRecon: refreshToken,
|
|
||||||
getIST: true, // todo: make an option
|
|
||||||
getPasslist: !!opt.stopovers,
|
|
||||||
getPolyline: !!opt.polylines,
|
|
||||||
getTariff: !!opt.tickets
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,8 @@ const defaultProfile = {
|
||||||
trip: false,
|
trip: false,
|
||||||
radar: false,
|
radar: false,
|
||||||
refreshJourney: true,
|
refreshJourney: true,
|
||||||
|
// refreshJourney(): use `outReconL[]` instead of `ctxRecon`?
|
||||||
|
refreshJourneyUseOutReconL: false,
|
||||||
tripsByName: true,
|
tripsByName: true,
|
||||||
remarks: true,
|
remarks: true,
|
||||||
lines: true,
|
lines: true,
|
||||||
|
|
|
@ -34,6 +34,7 @@ const cflProfile = {
|
||||||
trip: true,
|
trip: true,
|
||||||
radar: true,
|
radar: true,
|
||||||
reachableFrom: true,
|
reachableFrom: true,
|
||||||
|
refreshJourneyUseOutReconL: true,
|
||||||
remarks: true,
|
remarks: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue