mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 23:29:35 +02:00
25 lines
510 B
JavaScript
25 lines
510 B
JavaScript
'use strict'
|
|
|
|
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,
|
|
}
|
|
}
|
|
|
|
module.exports = formatRefreshJourneyReq
|