Always return the username as fetched from the database (#382)

Co-authored-by: Patrick <cryne@gmx.de>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Emma Cypress
2022-06-26 05:04:34 +00:00
committed by GitHub
parent e74b4b35b9
commit 134c43ad9e
2 changed files with 70 additions and 64 deletions

View File

@@ -127,7 +127,7 @@ impl User {
let result = sqlx::query!(
"
SELECT u.id, u.github_id, u.name, u.email,
u.avatar_url, u.bio,
u.avatar_url, u.username, u.bio,
u.created, u.role
FROM users u
WHERE LOWER(u.username) = LOWER($1)
@@ -144,7 +144,7 @@ impl User {
name: row.name,
email: row.email,
avatar_url: row.avatar_url,
username,
username: row.username,
bio: row.bio,
created: row.created,
role: row.role,