diff --git a/package.json b/package.json index 75e8273e..e64564af 100644 --- a/package.json +++ b/package.json @@ -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 ", diff --git a/parse.js b/parse.js index f7e8173d..8910e428 100644 --- a/parse.js +++ b/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 } }