From e6c94e01305b5a3bb47a67888279b67ae26f0419 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Tue, 21 Aug 2012 23:34:57 -0700 Subject: [PATCH] Fix example --- examples/config/validation.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 examples/config/validation.js diff --git a/examples/config/validation.js b/examples/config/validation.js old mode 100644 new mode 100755 index 424d980c1..a65cd4442 --- a/examples/config/validation.js +++ b/examples/config/validation.js @@ -43,11 +43,11 @@ internals.main = function () { // Set routes http.setRoutesDefaults({ authentication: 'none' }); - http.addRoutes([{ method: 'GET', path: '/', handler: internals.get, query: {username: S()} }]); - http.addRoutes([{ method: 'GET', path: '/admin', handler: internals.get, query: {username: S().required().with('password'), password: S()} }]); - http.addRoutes([{ method: 'GET', path: '/users', handler: internals.get, query: {email: S().email().required().min(18)} }]); - http.addRoutes([{ method: 'GET', path: '/config', handler: internals.get, query: {choices: A().required()} }]); - http.addRoutes([{ method: 'GET', path: '/test', handler: internals.get, query: {num: N().min(0)} }]); + http.addRoutes([{ method: 'GET', path: '/', config: { handler: internals.get, query: {username: S()} } }]); + http.addRoutes([{ method: 'GET', path: '/admin', config: { handler: internals.get, query: {username: S().required().with('password'), password: S()} } }]); + http.addRoutes([{ method: 'GET', path: '/users', config: { handler: internals.get, query: {email: S().email().required().min(18)} } }]); + http.addRoutes([{ method: 'GET', path: '/config', config: { handler: internals.get, query: { choices: A().required() } } }]); + http.addRoutes([{ method: 'GET', path: '/test', config: { handler: internals.get, query: {num: N().min(0)} } }]); // Start Hapi servers