fix parseWarning 🐛

This commit is contained in:
Jannis R 2019-05-27 16:32:42 +02:00
parent 820f2abe86
commit b3d75b567d
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 3 additions and 3 deletions

View file

@ -6,10 +6,10 @@ const vbbProfile = require('.')
const client = createClient(vbbProfile, 'hafas-client-example') const client = createClient(vbbProfile, 'hafas-client-example')
// Hauptbahnhof to Charlottenburg // Hauptbahnhof to Charlottenburg
client.journeys('900000003201', '900000024101', {results: 1, polylines: true}) // client.journeys('900000003201', '900000024101', {results: 1, polylines: true})
// client.departures('900000013102', {duration: 1}) // client.departures('900000013102', {duration: 1})
// client.arrivals('900000013102', {duration: 10, linesOfStops: true}) // client.arrivals('900000013102', {duration: 10, linesOfStops: true})
// client.locations('Alexanderplatz', {results: 2}) client.locations('txl A', {results: 2})
// client.stop('900000042101', {linesOfStops: true}) // Spichernstr // client.stop('900000042101', {linesOfStops: true}) // Spichernstr
// client.nearby({ // client.nearby({
// type: 'location', // type: 'location',

View file

@ -36,7 +36,7 @@ const parseWarning = (profile, w, icons) => {
priority: w.prio, priority: w.prio,
category: w.cat || null // todo: parse to sth meaningful category: w.cat || null // todo: parse to sth meaningful
} }
if ('prod' in w) res.products = client.profile.parseProducts(61442) if ('prod' in w) res.products = profile.parseProducts(61442)
// todo: pass tzOffset to `parseDateTime` // todo: pass tzOffset to `parseDateTime`
if (w.sDate && w.sTime) res.validFrom = parseDateTime(profile, w.sDate, w.sTime, null) if (w.sDate && w.sTime) res.validFrom = parseDateTime(profile, w.sDate, w.sTime, null)