mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-22 22:59:35 +02:00
artificially limit number of results, fixes #2
This commit is contained in:
parent
ed8683e8c2
commit
e4a99d4be3
1 changed files with 2 additions and 1 deletions
3
index.js
3
index.js
|
@ -213,7 +213,8 @@ const createClient = (profile, userAgent, opt = {}) => {
|
|||
const req = profile.transformJourneysQuery({profile, opt}, query);
|
||||
const {res, common} = await profile.request({profile, opt}, userAgent, req);
|
||||
const ctx = {profile, opt, common, res};
|
||||
const journeys = res.verbindungen
|
||||
const verbindungen = opt.results ? res.verbindungen.slice(0, opt.results) : res.verbindungen;
|
||||
const journeys = verbindungen
|
||||
.map(j => profile.parseJourney(ctx, j));
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue