1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Pass parsed request-URL into the run-method (#1000)

This commit is contained in:
Emanuel Kluge 2017-02-05 16:38:20 +01:00 committed by Dan Zajdband
parent 2af8a4cbcf
commit f6510c05b2

View file

@ -2,7 +2,7 @@ const pathWrapper = (app, pathName, opts) => ({ raw, query }, hapiReply) =>
app.renderToHTML(raw.req, raw.res, pathName, query, opts)
.then(hapiReply)
const defaultHandlerWrapper = app => ({ raw }, hapiReply) =>
app.run(raw.req, raw.res)
const defaultHandlerWrapper = app => ({ raw, url }, hapiReply) =>
app.run(raw.req, raw.res, url)
module.exports = { pathWrapper, defaultHandlerWrapper }