mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
fixes for journeyID and fahrtNr
This commit is contained in:
parent
491348bd3b
commit
c6bb1b468a
3 changed files with 2 additions and 3 deletions
|
@ -153,7 +153,6 @@ const request = async (ctx, userAgent, reqData) => {
|
|||
}
|
||||
|
||||
const body = await res.text();
|
||||
console.log(body);
|
||||
profile.logResponse(ctx, res, body, reqId);
|
||||
|
||||
const b = JSON.parse(body);
|
||||
|
|
|
@ -12,7 +12,7 @@ const createParseArrOrDep = (prefix) => {
|
|||
const {profile, opt} = ctx;
|
||||
|
||||
const res = {
|
||||
tripId: d.journeyID,
|
||||
tripId: d.journeyID || d.train.journeyId,
|
||||
stop: profile.parseLocation(ctx, d.station),
|
||||
...profile.parseWhen(ctx, null, d.timeSchedule ? d.timeSchedule : d.time, d.timePredicted ? d.timePredicted : d.time, d.canceled),
|
||||
...profile.parsePlatform(ctx, d.platformSchedule ? d.platformSchedule : d.platform, d.platformPredicted ? d.platformPredicted : d.platform, d.canceled),
|
||||
|
|
|
@ -5,7 +5,7 @@ const parseLine = (ctx, p) => {
|
|||
const res = {
|
||||
type: 'line',
|
||||
id: slugg(p.verkehrsmittel?.langText || p.transport?.journeyDescription || p.train?.no), // TODO terrible
|
||||
fahrtNr: p.verkehrsmittel?.nummer || p.transport?.number || p.train?.no,
|
||||
fahrtNr: (p.verkehrsmittel?.nummer || p.transport?.number || p.train?.no)+'',
|
||||
name: p.verkehrsmittel?.name || p.zugName || p.transport?.journeyDescription || p.train && p.train.category + ' ' + p.train.lineName,
|
||||
public: true,
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue