Skip to content

Commit

Permalink
removed renderToHTML from ssr-caching and custom-server-hapi in examp…
Browse files Browse the repository at this point in the history
…les (vercel#16138)

Fixes vercel#14737
  • Loading branch information
madiknox authored and Markus Lautenbach committed Aug 20, 2020
1 parent ca1189d commit 53407f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/custom-server-hapi/next-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const pathWrapper = (app, pathName, opts) => async (
{ raw, query, params },
h
) => {
const html = await app.renderToHTML(
const html = await app.render(
raw.req,
raw.res,
pathName,
Expand Down
2 changes: 1 addition & 1 deletion examples/ssr-caching/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const handle = app.getRequestHandler()
const ssrCache = cacheableResponse({
ttl: 1000 * 60 * 60, // 1hour
get: async ({ req, res }) => {
const data = await app.renderToHTML(req, res, req.path, {
const data = await app.render(req, res, req.path, {
...req.query,
...req.params,
})
Expand Down

0 comments on commit 53407f2

Please sign in to comment.