mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
bugfixes 🐛, 1.0.1
- fixed `destination` & `departure` of a journey - location IDs should be strings (according to FPTF)
This commit is contained in:
parent
43ed330396
commit
b0399215cd
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "hafas-client",
|
||||
"description": "JavaScript client for HAFAS mobile APIs.",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"main": "index.js",
|
||||
"files": ["index.js", "parse.js", "stringify.js"],
|
||||
"author": "Jannis R <mail@jannisr.de>",
|
||||
|
|
6
parse.js
6
parse.js
|
@ -29,7 +29,7 @@ const location = (l) => {
|
|||
longitude: l.crd.x / 1000000
|
||||
} : null
|
||||
}
|
||||
if (type === 'poi' || type === 'station') result.id = parseInt(l.extId)
|
||||
if (type === 'poi' || type === 'station') result.id = l.extId
|
||||
if ('pCls' in l) result.products = l.pCls
|
||||
return result
|
||||
}
|
||||
|
@ -132,8 +132,8 @@ const journey = (tz, s, ln, r) => (c) => {
|
|||
return {
|
||||
parts
|
||||
, origin: parts[0].origin
|
||||
, destination: parts[0].destination
|
||||
, departure: parts[parts.length - 1].departure
|
||||
, destination: parts[parts.length - 1].destination
|
||||
, departure: parts[0].departure
|
||||
, arrival: parts[parts.length - 1].arrival
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue