Skip to content

Commit

Permalink
Fix TypeScript compilation error in aws-ts-apigateway
Browse files Browse the repository at this point in the history
We know the pathParameters array will not be null, because we capture
parameters in our route.
  • Loading branch information
ellismg committed Apr 18, 2019
1 parent 7ddb999 commit 0711e55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws-ts-apigateway/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let endpoint = new awsx.apigateway.API("hello-world", {
path: "/{route+}",
method: "GET",
eventHandler: async (event) => {
let route = event.pathParameters["route"];
let route = event.pathParameters!["route"];
console.log(`Getting count for '${route}'`);

const client = new aws.sdk.DynamoDB.DocumentClient();
Expand Down

0 comments on commit 0711e55

Please sign in to comment.