Skip to content

Commit

Permalink
Merge pull request #4087 from jonathansamines/feature/update-routes-c…
Browse files Browse the repository at this point in the history
…onfig

[update-routes-config] Update API reference to use route.options
  • Loading branch information
hueniverse committed May 16, 2020
2 parents faab7a2 + cb96e07 commit 05109d7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions API.md
Expand Up @@ -1032,7 +1032,7 @@ server.auth.strategy('default', 'custom');
server.route({
method: 'GET',
path: '/',
config: {
options: {
auth: 'default',
handler: function (request, h) {

Expand Down Expand Up @@ -1970,7 +1970,7 @@ const server = Hapi.server();
server.route({
method: 'GET',
path: '/',
config: {
options: {
id: 'root',
handler: () => 'ok'
}
Expand All @@ -1995,7 +1995,7 @@ const server = Hapi.server();
server.route({
method: 'GET',
path: '/',
config: {
options: {
id: 'root',
handler: () => 'ok'
}
Expand Down Expand Up @@ -2245,7 +2245,7 @@ const user = {
}
};

server.route({ method: 'GET', path: '/user', config: user });
server.route({ method: 'GET', path: '/user', options: user });

// An array of routes

Expand Down Expand Up @@ -3109,7 +3109,7 @@ const pre3 = function (request, h) {
server.route({
method: 'GET',
path: '/',
config: {
options: {
pre: [
[
// m1 and m2 executed in parallel
Expand Down Expand Up @@ -3959,7 +3959,7 @@ const server = Hapi.server({ port: 80 });
server.route({
method: 'GET',
path: '/',
config: {
options: {
cache: { expiresIn: 5000 },
handler: function (request, h) {

Expand Down

0 comments on commit 05109d7

Please sign in to comment.