Bump SQLx version and Axum

This commit is contained in:
jude 2023-12-20 17:12:57 +00:00
parent 6bd815fd38
commit 444c5dce33
3 changed files with 479 additions and 264 deletions

728
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -2,15 +2,15 @@
name = "soundfx-rs" name = "soundfx-rs"
description = "Discord bot for custom sound effects and soundboards" description = "Discord bot for custom sound effects and soundboards"
license = "AGPL-3.0-only" license = "AGPL-3.0-only"
version = "1.5.16" version = "1.5.17"
authors = ["jellywx <judesouthworth@pm.me>"] authors = ["jellywx <judesouthworth@pm.me>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
songbird = { version = "0.4", features = ["builtin-queue"] } songbird = { version = "0.4", features = ["builtin-queue"] }
poise = "0.6.1-rc1" poise = "0.6.1-rc1"
sqlx = { version = "0.5", default-features = false, features = ["runtime-tokio-rustls", "macros", "mysql", "bigdecimal", "migrate"] } sqlx = { version = "0.7.3", default-features = false, features = ["runtime-tokio-rustls", "macros", "mysql", "bigdecimal", "migrate"] }
tokio = { version = "1", features = ["fs", "process", "io-util"] } tokio = { version = "1", features = ["fs", "process", "io-util", "rt-multi-thread"] }
lazy_static = "1.4" lazy_static = "1.4"
reqwest = "0.11" reqwest = "0.11"
env_logger = "0.10" env_logger = "0.10"
@ -21,7 +21,7 @@ dashmap = "5.5"
serde = "1.0" serde = "1.0"
dotenv = "0.15.0" dotenv = "0.15.0"
prometheus = { version = "0.13.3", optional = true } prometheus = { version = "0.13.3", optional = true }
axum = { version = "0.6.20", optional = true } axum = { version = "0.7.2", optional = true }
[dependencies.symphonia] [dependencies.symphonia]
version = "0.5" version = "0.5"

View File

@ -1,4 +1,5 @@
use poise::serenity_prelude::{async_trait, model::id::UserId, GuildId}; use poise::serenity_prelude::{async_trait, model::id::UserId, GuildId};
use sqlx::Acquire;
use crate::Data; use crate::Data;
@ -112,7 +113,7 @@ impl JoinSoundCtx for Data {
user_id.get(), user_id.get(),
guild_id.map(|g| g.get()) guild_id.map(|g| g.get())
) )
.execute(&mut transaction) .execute(transaction.acquire().await?)
.await?; .await?;
sqlx::query!( sqlx::query!(
@ -121,7 +122,7 @@ impl JoinSoundCtx for Data {
join_id, join_id,
guild_id.map(|g| g.get()) guild_id.map(|g| g.get())
) )
.execute(&mut transaction) .execute(transaction.acquire().await?)
.await?; .await?;
} }
@ -131,7 +132,7 @@ impl JoinSoundCtx for Data {
user_id.get(), user_id.get(),
guild_id.map(|g| g.get()) guild_id.map(|g| g.get())
) )
.execute(&mut transaction) .execute(transaction.acquire().await?)
.await?; .await?;
} }
} }