From 6a0c2449e4c4d22cf18e508bd1f13088a3314ca7 Mon Sep 17 00:00:00 2001 From: Mateus Cruz Date: Sun, 11 Feb 2024 16:44:31 -0300 Subject: test: concurrency test --- lib/handler.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') 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 -- cgit v1.2.3