mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
DB: add currency to price 🐛, enable journeyLeg
This commit is contained in:
parent
46ce4bbbe0
commit
e87ccf5a3b
2 changed files with 9 additions and 3 deletions
|
@ -62,7 +62,11 @@ const createParseJourney = (profile, stations, lines, remarks) => {
|
|||
) {
|
||||
const tariff = j.trfRes.fareSetL[0].fareL[0]
|
||||
if (tariff.prc >= 0) { // wat
|
||||
res.price = {amount: tariff.prc / 100, hint: null}
|
||||
res.price = {
|
||||
amount: tariff.prc / 100,
|
||||
currency: 'EUR',
|
||||
hint: null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,7 +100,9 @@ const dbProfile = {
|
|||
// todo: parseLocation
|
||||
parseJourney: createParseJourney,
|
||||
|
||||
formatStation
|
||||
formatStation,
|
||||
|
||||
journeyLeg: true
|
||||
}
|
||||
|
||||
module.exports = dbProfile
|
||||
|
|
|
@ -199,7 +199,7 @@ test('earlier/later journeys, Jungfernheide -> München Hbf', co(function* (t) {
|
|||
t.end()
|
||||
}))
|
||||
|
||||
test.skip('journey leg details', co(function* (t) {
|
||||
test('journey leg details', co(function* (t) {
|
||||
const journeys = yield client.journeys(berlinHbf, münchenHbf, {
|
||||
results: 1, when
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue