Skip to content

Commit 42881ed

Browse files
committed
Fix example for the API change (Sendable)
1 parent 132f9bd commit 42881ed

File tree

1 file changed

+2
-2
lines changed
  • Examples/APIGateway+LambdaAuthorizer/Sources/AuthorizerLambda

1 file changed

+2
-2
lines changed

Examples/APIGateway+LambdaAuthorizer/Sources/AuthorizerLambda/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import AWSLambdaRuntime
2222
// This code is shown for the example only and is not used in this demo.
2323
// This code doesn't perform any type of token validation. It should be used as a reference only.
2424
let policyAuthorizerHandler:
25-
(APIGatewayLambdaAuthorizerRequest, LambdaContext) async throws -> APIGatewayLambdaAuthorizerPolicyResponse = {
25+
@Sendable (APIGatewayLambdaAuthorizerRequest, LambdaContext) async throws -> APIGatewayLambdaAuthorizerPolicyResponse = {
2626
(request: APIGatewayLambdaAuthorizerRequest, context: LambdaContext) in
2727

2828
context.logger.debug("+++ Policy Authorizer called +++")
@@ -57,7 +57,7 @@ let policyAuthorizerHandler:
5757
//
5858
// This code doesn't perform any type of token validation. It should be used as a reference only.
5959
let simpleAuthorizerHandler:
60-
(APIGatewayLambdaAuthorizerRequest, LambdaContext) async throws -> APIGatewayLambdaAuthorizerSimpleResponse = {
60+
@Sendable (APIGatewayLambdaAuthorizerRequest, LambdaContext) async throws -> APIGatewayLambdaAuthorizerSimpleResponse = {
6161
(_: APIGatewayLambdaAuthorizerRequest, context: LambdaContext) in
6262

6363
context.logger.debug("+++ Simple Authorizer called +++")

0 commit comments

Comments
 (0)