From 4da36474258fd7d89adcfc1042e8e767123117f3 Mon Sep 17 00:00:00 2001 From: Mateus Cruz Date: Tue, 6 Feb 2024 12:12:59 -0300 Subject: fix: change transaction value minimum value --- lib/operation.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/operation.ml b/lib/operation.ml index 2e681f8..911c409 100644 --- a/lib/operation.ml +++ b/lib/operation.ml @@ -51,7 +51,7 @@ let decoder : transaction_op Utils.Decoder.decoder = <|> literal "d" *> return (fun p -> `Debit p) in (fun value transaction_type description -> transaction_type { value; description }) - <$> ("valor" <: (int >>= fun x -> if x >= 0 then return x else fail)) + <$> ("valor" <: (int >>= fun x -> if x >= 1 then return x else fail)) <*> ("tipo" <: transaction_type_decoder) <*> ("descricao" <: (string -- cgit v1.2.3