mirror of
https://github.com/supleed2/nanobot.git
synced 2024-12-22 14:15:51 +00:00
Lowercase shortcode
when inserting to db
This commit is contained in:
parent
076dd9e0f9
commit
ddf6b00a8c
|
@ -41,7 +41,7 @@ pub(crate) async fn insert_manual(pool: &sqlx::PgPool, m: ManualMember) -> Resul
|
||||||
sqlx::query!(
|
sqlx::query!(
|
||||||
"insert into manual values ($1,$2,$3,$4,$5)",
|
"insert into manual values ($1,$2,$3,$4,$5)",
|
||||||
m.discord_id,
|
m.discord_id,
|
||||||
m.shortcode,
|
m.shortcode.to_lowercase(),
|
||||||
m.nickname,
|
m.nickname,
|
||||||
m.realname,
|
m.realname,
|
||||||
m.fresher
|
m.fresher
|
||||||
|
|
|
@ -115,7 +115,7 @@ pub(crate) async fn insert_member(pool: &sqlx::PgPool, m: Member) -> Result<(),
|
||||||
sqlx::query!(
|
sqlx::query!(
|
||||||
"insert into members values ($1, $2, $3, $4, $5)",
|
"insert into members values ($1, $2, $3, $4, $5)",
|
||||||
m.discord_id,
|
m.discord_id,
|
||||||
m.shortcode,
|
m.shortcode.to_lowercase(),
|
||||||
m.nickname,
|
m.nickname,
|
||||||
m.realname,
|
m.realname,
|
||||||
m.fresher
|
m.fresher
|
||||||
|
|
|
@ -43,7 +43,7 @@ pub(crate) async fn insert_pending(pool: &sqlx::PgPool, p: PendingMember) -> Res
|
||||||
sqlx::query!(
|
sqlx::query!(
|
||||||
"insert into pending values ($1, $2, $3)",
|
"insert into pending values ($1, $2, $3)",
|
||||||
p.discord_id,
|
p.discord_id,
|
||||||
p.shortcode,
|
p.shortcode.to_lowercase(),
|
||||||
p.realname
|
p.realname
|
||||||
)
|
)
|
||||||
.execute(pool)
|
.execute(pool)
|
||||||
|
|
Loading…
Reference in a new issue