fix delete question
This commit is contained in:
parent
a5b576838c
commit
20dae82345
@ -281,14 +281,14 @@ impl Store {
|
|||||||
let delete_question_query = "DELETE FROM questions WHERE id = $1";
|
let delete_question_query = "DELETE FROM questions WHERE id = $1";
|
||||||
// First, delete any possible question/tag associations
|
// First, delete any possible question/tag associations
|
||||||
match sqlx::query(delete_question_tag_query)
|
match sqlx::query(delete_question_tag_query)
|
||||||
.bind(id.to_string())
|
.bind(i32::from(id))
|
||||||
.execute(&self.connection)
|
.execute(&self.connection)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
//Now, delete the question
|
//Now, delete the question
|
||||||
match sqlx::query(delete_question_query)
|
match sqlx::query(delete_question_query)
|
||||||
.bind(id.to_string())
|
.bind(i32::from(id))
|
||||||
.execute(&self.connection)
|
.execute(&self.connection)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user