From b6c16c83c144040bc0e3fcf88e93ec6f8db2af7f Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Fri, 12 Jun 2020 08:55:17 +0530 Subject: [PATCH] :ambulance: Critical hotfix --- functions/api.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/api.js b/functions/api.js index 1b5cc68ca..5e95b8332 100644 --- a/functions/api.js +++ b/functions/api.js @@ -1,9 +1,9 @@ // Docs on event and context https://www.netlify.com/docs/functions/#the-handler-method -export async function handler({ httpMethod, queryStringParameters }, context) { - switch (httpMethod) { +exports.handler = async (event, context) => { + switch (event.httpMethod) { case "GET": try { - const name = queryStringParameters.name || "World" + const name = event.queryStringParameters.name || "World" return { statusCode: 200, headers: {