diff --git a/api.js b/api.js index 30f874a..4c0a103 100644 --- a/api.js +++ b/api.js @@ -12,7 +12,7 @@ import Redis from 'ioredis' import {createCachedHafasClient} from 'cached-hafas-client' import {createRedisStore} from 'cached-hafas-client/stores/redis.js' import serveStatic from 'serve-static' -import {parseBoolean} from 'hafas-rest-api/lib/parse.js' +import {parseBoolean, parseInteger} from 'hafas-rest-api/lib/parse.js' import {loyaltyCardParser} from './lib/loyalty-cards.js' import {route as stations} from './routes/stations.js' import {route as station} from './routes/station.js' @@ -60,6 +60,12 @@ const mapRouteParsers = (route, parsers) => { default: 'false', parse: parseBoolean, }, + age: { + description: 'Age of traveller', + type: 'integer', + defaultStr: '*adult*', + parse: parseInteger + }, } }