Skip to content

Commit

Permalink
Merge pull request #6 from nicktrienensfuzz/update-path-usage
Browse files Browse the repository at this point in the history
Update APIGatewayV2Lambda path getter
  • Loading branch information
adam-fowler committed Jul 11, 2023
2 parents 536cf5d + cf1f985 commit 1900beb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sources/HummingbirdLambda/APIGatewayV2Lambda.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ extension HBLambda where Output == APIGatewayV2Response {
// conform `APIGatewayV2Request` to `APIRequest` so we can use HBRequest.init(context:application:from)
extension APIGatewayV2Request: APIRequest {
var path: String {
// use routeKey as path has stage in it
return String(routeKey.split(separator: " ", maxSplits: 1).last!)
return context.http.path
}

var httpMethod: AWSLambdaEvents.HTTPMethod { context.http.method }
Expand Down

0 comments on commit 1900beb

Please sign in to comment.