From fad2283aa2bc0699609ddd22dba369c3e99aef18 Mon Sep 17 00:00:00 2001 From: Aleksei Voronov Date: Sun, 15 Oct 2023 17:19:15 +0200 Subject: [PATCH] Lol, actually use the transaction that we make --- src/services/database.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/database.rs b/src/services/database.rs index 0b41496..e68bf70 100644 --- a/src/services/database.rs +++ b/src/services/database.rs @@ -154,7 +154,7 @@ impl Database { did: &str, likely_country_of_living: &str, ) -> Result { - let transaction = self.connection_pool.begin().await?; + let mut transaction = self.connection_pool.begin().await?; { let mut params = Parameters::new(); @@ -168,7 +168,7 @@ impl Database { .to_string(), ) .bind(did) - .execute(&self.connection_pool) + .execute(&mut *transaction) .await?; } @@ -183,7 +183,7 @@ impl Database { ) .bind(likely_country_of_living) .bind(did) - .execute(&self.connection_pool) + .execute(&mut *transaction) .await?; }