mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-05 11:10:24 +02:00
Fixed: (Cardigann) Add check for request.inputs, since are null when pathselector is used
Fixes #1158
This commit is contained in:
parent
c6ed5d65e0
commit
451f60319f
1 changed files with 11 additions and 8 deletions
|
|
@ -728,16 +728,19 @@ protected async Task<HttpResponse> HandleRequest(RequestBlock request, Dictionar
|
|||
pairs = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
foreach (var input in request.Inputs)
|
||||
if (request.Inputs != null)
|
||||
{
|
||||
var value = ApplyGoTemplateText(input.Value, variables);
|
||||
if (method == HttpMethod.Get)
|
||||
foreach (var input in request.Inputs)
|
||||
{
|
||||
queryCollection.Add(input.Key, value);
|
||||
}
|
||||
else if (method == HttpMethod.Post)
|
||||
{
|
||||
pairs.Add(input.Key, value);
|
||||
var value = ApplyGoTemplateText(input.Value, variables);
|
||||
if (method == HttpMethod.Get)
|
||||
{
|
||||
queryCollection.Add(input.Key, value);
|
||||
}
|
||||
else if (method == HttpMethod.Post)
|
||||
{
|
||||
pairs.Add(input.Key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue