Lowercase shortcode when inserting to db

This commit is contained in:
Aadi Desai 2024-02-10 22:04:03 +00:00
parent 076dd9e0f9
commit ddf6b00a8c
Signed by: supleed2
SSH key fingerprint: SHA256:CkbNRs0yVzXEiUp2zd0PSxsfRUMFF9bLlKXtE1xEbKM
3 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ pub(crate) async fn insert_manual(pool: &sqlx::PgPool, m: ManualMember) -> Resul
sqlx::query!(
"insert into manual values ($1,$2,$3,$4,$5)",
m.discord_id,
m.shortcode,
m.shortcode.to_lowercase(),
m.nickname,
m.realname,
m.fresher

View file

@ -115,7 +115,7 @@ pub(crate) async fn insert_member(pool: &sqlx::PgPool, m: Member) -> Result<(),
sqlx::query!(
"insert into members values ($1, $2, $3, $4, $5)",
m.discord_id,
m.shortcode,
m.shortcode.to_lowercase(),
m.nickname,
m.realname,
m.fresher

View file

@ -43,7 +43,7 @@ pub(crate) async fn insert_pending(pool: &sqlx::PgPool, p: PendingMember) -> Res
sqlx::query!(
"insert into pending values ($1, $2, $3)",
p.discord_id,
p.shortcode,
p.shortcode.to_lowercase(),
p.realname
)
.execute(pool)