Skip to content

Commit 056767e

Browse files
chore: change func template to remove callback (#360)
1 parent 878acab commit 056767e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/templates/functionBase.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Render function for the Next.js page
55
const renderNextPage = require('./renderNextPage')
66

7-
const base = async (event, context, callback) => {
7+
const base = async (event, context) => {
88
// x-forwarded-host is undefined on Netlify for proxied apps that need it
99
// fixes https://github.com/netlify/next-on-netlify/issues/46
1010
if (!event.multiValueHeaders.hasOwnProperty('x-forwarded-host')) {
@@ -26,7 +26,7 @@ const base = async (event, context, callback) => {
2626

2727
response.multiValueHeaders['Cache-Control'] = ['no-cache']
2828

29-
callback(null, response)
29+
return response
3030
}
3131

3232
module.exports = base

0 commit comments

Comments
 (0)