Skip to content

Commit

Permalink
#615: Check for AzFunc2.0 function name, otherwise check for AzFunc3.…
Browse files Browse the repository at this point in the history
…0 name
  • Loading branch information
Badgerati committed Oct 15, 2020
1 parent 262a195 commit e65c8de
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Private/Serverless.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ function Start-PodeAzFuncServer
$WebEvent.Path = $request.Query['static-file']
}
else {
$WebEvent.Path = "/api/$($Data.sys.MethodName)"
$funcName = $Data.sys.MethodName
if ([string]::IsNullOrWhiteSpace($funcName)) {
$funcName = $Data.FunctionName
}

$WebEvent.Path = "/api/$($funcName)"
}

$WebEvent.Path = [System.Web.HttpUtility]::UrlDecode($WebEvent.Path)
Expand Down

0 comments on commit e65c8de

Please sign in to comment.