Merge pull request 'fix error' (#560) from fix-user-find-bug into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m28s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 6m56s

Reviewed-on: #560
This commit is contained in:
philipp 2024-05-28 15:04:50 +02:00
commit 3c0b8e5114

View File

@ -486,6 +486,8 @@ WHERE id like ?
} }
pub async fn find_by_name(db: &SqlitePool, name: &str) -> Option<Self> { pub async fn find_by_name(db: &SqlitePool, name: &str) -> Option<Self> {
let name = name.trim().to_lowercase();
sqlx::query_as!( sqlx::query_as!(
Self, Self,
" "