mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
Use risZuglaufId to get fahrtNr (#8)
This commit is contained in:
parent
8d07b24604
commit
942972d5f0
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@ import slugg from 'slugg';
|
||||||
|
|
||||||
const parseLine = (ctx, p) => {
|
const parseLine = (ctx, p) => {
|
||||||
const profile = ctx.profile;
|
const profile = ctx.profile;
|
||||||
const fahrtNr = p.verkehrsmittel?.nummer || p.transport?.number || p.train?.no || p.verkehrsmittelNummer || ((p.mitteltext || '') + ' ').split(' ')[1];
|
const fahrtNr = p.verkehrsmittel?.nummer || p.transport?.number || p.train?.no || ((p.risZuglaufId || '') + '_').split('_')[1] || p.verkehrsmittelNummer || ((p.mitteltext || '') + ' ').split(' ')[1];
|
||||||
const res = {
|
const res = {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
id: slugg(p.verkehrsmittel?.langText || p.transport?.journeyDescription || p.train && p.train.category + ' ' + p.train.lineName + ' ' + p.train.no || p.langtext || p.mitteltext), // TODO terrible
|
id: slugg(p.verkehrsmittel?.langText || p.transport?.journeyDescription || p.train && p.train.category + ' ' + p.train.lineName + ' ' + p.train.no || p.langtext || p.mitteltext), // TODO terrible
|
||||||
|
|
Loading…
Add table
Reference in a new issue