Correção para a variável documentType somente ser verificada se ela existir.
This commit is contained in:
parent
e4be58d728
commit
c549dc8615
@ -118,7 +118,10 @@ namespace Webhook_4docs
|
|||||||
|
|
||||||
JsonElement DadosJson = JsonDocument.Parse(root.ToString()).RootElement;
|
JsonElement DadosJson = JsonDocument.Parse(root.ToString()).RootElement;
|
||||||
|
|
||||||
|
if (root.Get("documentType").ToString().ToLower() != string.Empty)
|
||||||
|
{
|
||||||
if (root.Get("documentType")?.ToString().ToLower() != "nota_fiscal") { return; }
|
if (root.Get("documentType")?.ToString().ToLower() != "nota_fiscal") { return; }
|
||||||
|
}
|
||||||
|
|
||||||
Fatura fatura = new(fatura_ID, JsonBody);
|
Fatura fatura = new(fatura_ID, JsonBody);
|
||||||
bool completed = false;
|
bool completed = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user