diff options
Diffstat (limited to 'lib/handler.ml')
-rw-r--r-- | lib/handler.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/handler.ml b/lib/handler.ml index fb43239..c1ba53d 100644 --- a/lib/handler.ml +++ b/lib/handler.ml @@ -44,6 +44,12 @@ let create_transaction client_id (db_pool : pool) (request : Request.t) = in (match insert_result with | Ok () -> + let client = + Option.get + @@ Option.join + @@ Result.to_option + @@ Query.find_client client_id conn + in let json : Yojson.Safe.t = `Assoc [ "limite", `Int client.mov_limit; "saldo", `Int client.balance ] in |