2020-02-07 02:31:51 +01:00
|
|
|
const formatRefreshJourneyReq = (ctx, refreshToken) => {
|
2020-02-27 15:52:01 +01:00
|
|
|
// eslint-disable-next-line no-unused-vars
|
2020-02-07 02:31:51 +01:00
|
|
|
const {profile, opt} = ctx
|
|
|
|
|
2021-01-10 20:45:37 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2020-02-07 02:31:51 +01:00
|
|
|
return {
|
|
|
|
meth: 'Reconstruction',
|
2021-01-10 20:45:37 +01:00
|
|
|
req,
|
2020-02-07 02:31:51 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-07 16:17:37 +02:00
|
|
|
export {
|
|
|
|
formatRefreshJourneyReq,
|
|
|
|
}
|