diff --git a/Webhook 4docs/Program.cs b/Webhook 4docs/Program.cs index 1a55476..4ae88e6 100644 --- a/Webhook 4docs/Program.cs +++ b/Webhook 4docs/Program.cs @@ -118,9 +118,11 @@ namespace Webhook_4docs JsonElement DadosJson = JsonDocument.Parse(root.ToString()).RootElement; - if (root.Get("documentType").ToString().ToLower() != string.Empty) + string tipoDocumento = root.Get("documentType").ToString().ToLower(); + + if (tipoDocumento != string.Empty && tipoDocumento != "nota_fiscal") { - if (root.Get("documentType")?.ToString().ToLower() != "nota_fiscal") { return; } + return; } Fatura fatura = new(fatura_ID, JsonBody);