Route “config” is now “options”
iraniamir opened this issue · comments
Amir Irani commented
Features like validation and handling for failed validation are part of a dedicated route configuration. You need to specify an object with the functionality, like validate. You can also add the handler in the configuration.
In hapi v17, this object changes its name from config to options. The config key will still work, but is deprecated.
server.route({
method: 'GET',
path: '/',
options: { … }
})
// works, but deprecated
server.route({
method: 'GET',
path: '/',
config: { … }
})
https://futurestud.io/tutorials/hapi-v17-upgrade-guide-your-move-to-async-await