Unverified Commit 604ca6c6 authored by madiknox's avatar madiknox Committed by GitHub

removed renderToHTML from ssr-caching and custom-server-hapi in examples (#16138)

Fixes #14737  
parent d81ace26
...@@ -10,7 +10,7 @@ const pathWrapper = (app, pathName, opts) => async ( ...@@ -10,7 +10,7 @@ const pathWrapper = (app, pathName, opts) => async (
{ raw, query, params }, { raw, query, params },
h h
) => { ) => {
const html = await app.renderToHTML( const html = await app.render(
raw.req, raw.req,
raw.res, raw.res,
pathName, pathName,
......
...@@ -11,7 +11,7 @@ const handle = app.getRequestHandler() ...@@ -11,7 +11,7 @@ const handle = app.getRequestHandler()
const ssrCache = cacheableResponse({ const ssrCache = cacheableResponse({
ttl: 1000 * 60 * 60, // 1hour ttl: 1000 * 60 * 60, // 1hour
get: async ({ req, res }) => { 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.query,
...req.params, ...req.params,
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment