Skip to content

Commit

Permalink
Fix: use DB pool correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
rhwddy committed May 2, 2024
1 parent 7665b6b commit e44fe36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub async fn create(user_id: Uuid) -> Uuid{
let session = sqlx::query!(
"INSERT INTO sessions (user_id) VALUES ($1) RETURNING *",
user_id
).fetch_one(&db_pool.db).await;
).fetch_one(&db_pool).await;

match session {
Ok(session) => {
Expand Down

0 comments on commit e44fe36

Please sign in to comment.