mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-04-20 23:23:56 +03:00
parseJourney: parse freqency
This commit is contained in:
parent
17b8f1485f
commit
4b56f6608c
1 changed files with 9 additions and 0 deletions
|
@ -43,6 +43,15 @@ const createParseJourney = (profile, opt, data) => {
|
|||
refreshToken: j.ctxRecon || null
|
||||
}
|
||||
|
||||
const freq = j.freq || {}
|
||||
if (freq.minC || freq.maxC) {
|
||||
res.cycle = {}
|
||||
if (freq.minC) res.cycle.min = freq.minC * 60
|
||||
if (freq.maxC) res.cycle.max = freq.maxC * 60
|
||||
// nr of connections in this frequency, from now on
|
||||
if (freq.numC) res.cycle.nr = freq.numC
|
||||
}
|
||||
|
||||
if (opt.remarks && Array.isArray(j.msgL)) {
|
||||
res.remarks = []
|
||||
for (let ref of j.msgL) {
|
||||
|
|
Loading…
Add table
Reference in a new issue