mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
18 lines
324 B
JavaScript
18 lines
324 B
JavaScript
|
import {formatTripReq as hafasFormatTripReq} from '../../format/trip-req.js';
|
||
|
|
||
|
|
||
|
const formatTripReq = ({profile, opt}, id) => {
|
||
|
if (id.includes('#')) {
|
||
|
return hafasFormatTripReq({profile, opt}, id);
|
||
|
}
|
||
|
return {
|
||
|
endpoint: profile.regioGuideTripEndpoint,
|
||
|
path: id,
|
||
|
method: 'get',
|
||
|
};
|
||
|
};
|
||
|
|
||
|
export {
|
||
|
formatTripReq,
|
||
|
};
|