File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ General use
72
72
export const hello = LambdaUtils.wrapApiHandler(async (event: LambdaUtils.APIGatewayProxyEvent) => {
73
73
// These event objects are now always defined, so don't need to check for undefined. 🙂
74
74
const who = event.pathParameters.who;
75
- const points = parseInt (event.queryStringParameters.points || 0 );
75
+ let points = Number (event.queryStringParameters.points || '0' );
76
76
77
77
if (points > 0) {
78
78
let message = 'Hello ' + who;
Original file line number Diff line number Diff line change @@ -10,9 +10,6 @@ import {Logger} from "@sailplane/logger";
10
10
11
11
const logger = new Logger ( 'lambda-utils' ) ;
12
12
13
- /** Define the async version of ProxyHandler */
14
- export type AsyncProxyHandler = ( event : APIGatewayEvent , context : Context ) => Promise < any > ;
15
-
16
13
/**
17
14
* Casted interface for APIGatewayProxyEvents as converted through the middleware
18
15
*/
@@ -33,6 +30,9 @@ export interface APIGatewayProxyEvent extends AWS_APIGatewayProxyEvent {
33
30
queryStringParameters : { [ name : string ] : string } ;
34
31
}
35
32
33
+ /** Define the async version of ProxyHandler */
34
+ export type AsyncProxyHandler = ( event : APIGatewayProxyEvent , context : Context ) => Promise < any > ;
35
+
36
36
/**
37
37
* Middleware to handle any otherwise unhandled exception by logging it and generating
38
38
* an HTTP 500 response.
You can’t perform that action at this time.
0 commit comments