From 5fc3737e9f6aa6dd4f6484d9ae2024b2f931cb5b Mon Sep 17 00:00:00 2001 From: Mikael Lindahl Date: Wed, 5 Oct 2016 00:13:52 +0200 Subject: [PATCH] bugfix --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index 870624e..d0ade93 100644 --- a/index.js +++ b/index.js @@ -11,6 +11,8 @@ exports.register = function ( server, options, next ) { let lookup={}; options.forEach((val)=>{ + lookup[val.status_code]={} + for (let key in val){ lookup[val.status_code][key]=val[key] @@ -20,6 +22,9 @@ exports.register = function ( server, options, next ) { }) + + console.log(lookup) + // onPreResponse intercepts ALL errors server.ext( 'onPreResponse', ( request, reply ) => {