Skip to content

Commit

Permalink
fix: replace query macro
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-bozin-org committed May 4, 2024
1 parent 262d0b2 commit 9b3651f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/wisdoms_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ pub async fn worker_thread(pool: PgPool) {
.expect("Failed to check if wisdom exists");

if existing_wisdom.count == 0 {
sqlx::query!(
"INSERT INTO wisdoms (description) VALUES ($1)",
wisdom.description
)
sqlx::query("INSERT INTO wisdoms (description) VALUES ($1)")
.bind(&wisdom.description)
.execute(&pool)
.await
.expect("Failed to insert wisdom into database");
Expand Down

0 comments on commit 9b3651f

Please sign in to comment.