2020-02-07 02:31:51 +01:00
|
|
|
const formatRefreshJourneyReq = (ctx, refreshToken) => {
|
2024-02-06 22:58:49 +01:00
|
|
|
const {profile, opt} = ctx;
|
2020-02-07 02:31:51 +01:00
|
|
|
|
2021-01-10 20:45:37 +01:00
|
|
|
const req = {
|
|
|
|
getIST: true, // todo: make an option
|
2024-02-06 22:58:49 +01:00
|
|
|
getPasslist: Boolean(opt.stopovers),
|
|
|
|
getPolyline: Boolean(opt.polylines),
|
|
|
|
getTariff: Boolean(opt.tickets),
|
|
|
|
};
|
2021-01-10 20:45:37 +01:00
|
|
|
if (profile.refreshJourneyUseOutReconL) {
|
2024-02-06 22:58:49 +01:00
|
|
|
req.outReconL = [{ctx: refreshToken}];
|
2021-01-10 20:45:37 +01:00
|
|
|
} else {
|
2024-02-06 22:58:49 +01:00
|
|
|
req.ctxRecon = refreshToken;
|
2021-01-10 20:45:37 +01:00
|
|
|
}
|
|
|
|
|
2020-02-07 02:31:51 +01:00
|
|
|
return {
|
|
|
|
meth: 'Reconstruction',
|
2021-01-10 20:45:37 +01:00
|
|
|
req,
|
2024-02-06 22:58:49 +01:00
|
|
|
};
|
|
|
|
};
|
2020-02-07 02:31:51 +01:00
|
|
|
|
2022-05-07 16:17:37 +02:00
|
|
|
export {
|
|
|
|
formatRefreshJourneyReq,
|
2024-02-06 22:58:49 +01:00
|
|
|
};
|