mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
DB: remove stop() v1.16 workaround
Also, `LocGeoPos`/nearby() doesn't seem to break with `getStops: false` anymore.
This commit is contained in:
parent
1a0b595a71
commit
97268d7a8a
2 changed files with 5 additions and 21 deletions
|
@ -41,21 +41,6 @@ const transformReqBody = (ctx, body) => {
|
||||||
return body;
|
return body;
|
||||||
};
|
};
|
||||||
|
|
||||||
const transformReq = (ctx, req) => {
|
|
||||||
const body = JSON.parse(req.body);
|
|
||||||
// stop() a.k.a. LocDetails seems broken with ver >1.16, all other methods work
|
|
||||||
if (body.svcReqL[0].meth === 'LocDetails') {
|
|
||||||
req.body = JSON.stringify({
|
|
||||||
...body,
|
|
||||||
ver: '1.16',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// todo: `LocGeoPos`/nearby() breaks with `getStops: false`
|
|
||||||
|
|
||||||
return req;
|
|
||||||
};
|
|
||||||
|
|
||||||
const slices = (n, arr) => {
|
const slices = (n, arr) => {
|
||||||
const initialState = {slices: [], count: Infinity};
|
const initialState = {slices: [], count: Infinity};
|
||||||
return arr.reduce(({slices, count}, item) => {
|
return arr.reduce(({slices, count}, item) => {
|
||||||
|
@ -674,7 +659,6 @@ const profile = {
|
||||||
addChecksum: true,
|
addChecksum: true,
|
||||||
|
|
||||||
transformReqBody,
|
transformReqBody,
|
||||||
transformReq,
|
|
||||||
transformJourneysQuery,
|
transformJourneysQuery,
|
||||||
formatRefreshJourneyReq,
|
formatRefreshJourneyReq,
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue