Skip to content

Commit fd6ede9

Browse files
committed
remove explicit @sendable
1 parent fd74055 commit fd6ede9

File tree

1 file changed

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

1 file changed

+4
-2
lines changed

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

Lines changed: 4 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-
@Sendable (APIGatewayLambdaAuthorizerRequest, LambdaContext) async throws ->
25+
(APIGatewayLambdaAuthorizerRequest, LambdaContext) async throws ->
2626
APIGatewayLambdaAuthorizerPolicyResponse = {
2727
(request: APIGatewayLambdaAuthorizerRequest, context: LambdaContext) in
2828

@@ -51,7 +51,9 @@ let policyAuthorizerHandler:
5151
]
5252
)
5353
}
54-
// let runtime = LambdaRuntime(body: policyAuthorizerHandler)
54+
// let runtime = LambdaRuntime() { try await policyAuthorizerHandler($0, $1) }
55+
// start polling for new events.
56+
// try await runtime.run()
5557

5658
//
5759
// This is an example of a simple authorizer that always authorizes the request.

0 commit comments

Comments
 (0)