Transpiled ES5 code to ES6/ES7

This commit is contained in:
Liyas Thomas
2020-06-11 19:55:40 +05:30
parent 9bc0ae975a
commit 0644a8c9fb
16 changed files with 108 additions and 123 deletions

View File

@@ -1,9 +1,9 @@
// Docs on event and context https://www.netlify.com/docs/functions/#the-handler-method
exports.handler = async (event, context) => {
switch (event.httpMethod) {
export async function handler({ httpMethod, queryStringParameters }, context) {
switch (httpMethod) {
case "GET":
try {
const name = event.queryStringParameters.name || "World"
const name = queryStringParameters.name || "World"
return {
statusCode: 200,
headers: {