DB: add currency to price 🐛, enable journeyLeg

This commit is contained in:
Jannis R 2018-04-19 14:55:51 +02:00
parent 46ce4bbbe0
commit e87ccf5a3b
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 9 additions and 3 deletions

View file

@ -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

View file

@ -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
})