hapi-route-directory
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -7,6 +7,15 @@ var _ = require('lodash'); | ||
internals.path = options.path || '/'; | ||
// allow supplying options.auth=false or other auth scheme | ||
// to override a default auth scheme | ||
internals.config = {}; | ||
if(typeof options.auth !== 'undefined'){ | ||
internals.config.auth = options.auth; | ||
} | ||
plugin.servers.forEach(function (server) { | ||
plugin.route({method: 'GET', path: internals.path, handler: function(request, reply) { | ||
plugin.route({ | ||
method: 'GET', | ||
path: internals.path, | ||
config: internals.config, | ||
handler: function(request, reply) { | ||
@@ -13,0 +22,0 @@ var apiDirectory = {methods: {}, paths: []}; |
{ | ||
"name": "hapi-route-directory", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A route directory for HAPI", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
4034
53