Skip to content

Commit 16319a3

Browse files
committed
fix(app): await for async functions
1 parent 10a7ba6 commit 16319a3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

application/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ export async function handler(event, context) {
44
console.log("EVENT: \n" + JSON.stringify(event, null, 2));
55
console.log("CONTEXT: \n" + JSON.stringify(context, null, 2));
66

7-
return Router(event, context);
7+
return await Router(event, context);
88
}

application/routes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ async function routeHandler(event, context) {
2222

2323
switch (routeKey) {
2424
case "/_GET":
25-
return index();
25+
return await index();
2626
case "/_POST":
2727
var body = JSON.parse(event.body);
28-
return greet(body.name);
28+
return await greet(body.name);
2929
default:
3030
return {
3131
statusCode: 404,

0 commit comments

Comments
 (0)