File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -47,26 +47,13 @@ extension OpenAPILambda {
4747 try OpenAPILambdaHandler < Self > ( ) . handler
4848 }
4949
50- /// Invokes the OpenAPI Lambda handler function for this OpenAPI Lambda implementation
51- /// - Parameters:
52- /// - event: The event for the Lambda function
53- /// - context: The Lambda context
54- /// - Throws: An error if the handler function fails
55- /// - Returns: The output of the handler function
56- private static func handler( event: Event , context: LambdaContext ) async throws -> Output {
57- try await Self . handler ( ) ( event, context)
58- }
59-
6050 /// Start the Lambda Runtime with the Lambda handler function for this OpenAPI Lambda implementation with a custom logger,
6151 /// when one is given.
6252 /// - Parameter logger: The logger to use for Lambda runtime logging
6353 public static func run( logger: Logger ? = nil ) async throws {
6454
65- let lambdaRuntime = LambdaRuntime { ( event: Event , context: LambdaContext ) in
66- try await Self . handler ( event: event, context: context)
67- }
68-
69- // let lambdaRuntime = try LambdaRuntime(body: Self.handler())
55+ let _logger = logger ?? Logger ( label: " OpenAPILambda " )
56+ let lambdaRuntime = try LambdaRuntime ( logger: _logger, body: Self . handler ( ) )
7057 try await lambdaRuntime. run ( )
7158 }
7259}
You can’t perform that action at this time.
0 commit comments