diff options
author | Mateus Cruz <mateuscolvr@gmail.com> | 2024-02-06 12:12:59 -0300 |
---|---|---|
committer | Mateus Cruz <mateuscolvr@gmail.com> | 2024-02-06 12:12:59 -0300 |
commit | 4da36474258fd7d89adcfc1042e8e767123117f3 (patch) | |
tree | 43acb09c468adea5836a7f97a48878b4b8609e5b | |
parent | 606f39cb00766e5be46b38e3c3034e702c3795e6 (diff) |
fix: change transaction value minimum value
-rw-r--r-- | lib/operation.ml | 2 |
1 files changed, 1 insertions, 1 deletions
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 |