mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-04-20 23:23:56 +03:00
parseJourneyLeg: parse freq.numC
This commit is contained in:
parent
1ebb958b4a
commit
17b8f1485f
1 changed files with 4 additions and 1 deletions
|
@ -118,13 +118,16 @@ const createParseJourneyLeg = (profile, opt, data) => {
|
|||
}
|
||||
|
||||
const freq = pt.jny.freq || {}
|
||||
// todo: expose `res.cycle` even if only one field exists (breaking)
|
||||
if (freq.minC && freq.maxC) {
|
||||
// todo: what is freq.numC?
|
||||
res.cycle = {
|
||||
min: freq.minC * 60,
|
||||
max: freq.maxC * 60
|
||||
}
|
||||
// nr of connections in this frequency, from now on
|
||||
if (freq.numC) res.cycle.nr = freq.numC
|
||||
}
|
||||
|
||||
if (freq.jnyL) {
|
||||
const parseAlternative = (a) => {
|
||||
const t = a.stopL[0].dTimeR || a.stopL[0].dTimeS
|
||||
|
|
Loading…
Add table
Reference in a new issue