From 20dae82345bbf7b7f7f41afe467eb4d647052cf5 Mon Sep 17 00:00:00 2001 From: David Westgate Date: Sun, 2 Jun 2024 18:19:39 -0700 Subject: [PATCH] fix delete question --- src/pg_store.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pg_store.rs b/src/pg_store.rs index 5353bfa..8991daf 100644 --- a/src/pg_store.rs +++ b/src/pg_store.rs @@ -281,14 +281,14 @@ impl Store { let delete_question_query = "DELETE FROM questions WHERE id = $1"; // First, delete any possible question/tag associations match sqlx::query(delete_question_tag_query) - .bind(id.to_string()) + .bind(i32::from(id)) .execute(&self.connection) .await { Ok(_) => { //Now, delete the question match sqlx::query(delete_question_query) - .bind(id.to_string()) + .bind(i32::from(id)) .execute(&self.connection) .await {