Skip to content

Commit 2e4437c

Browse files
Fix case-insensitive username lookup for platforms endpoint
- Add LOWER() function to /users/:username/platforms endpoint - Completes case-insensitive username support across all public endpoints
1 parent fd5b699 commit 2e4437c

2 files changed

Lines changed: 818 additions & 603 deletions

File tree

backend/src/handlers/contributions.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,9 @@ pub async fn get_user_contributions(
293293

294294
// Find user by username (case-insensitive)
295295
let user_model = user::Entity::find()
296-
.filter(user::Column::Username.eq(&username))
296+
.filter(
297+
Expr::expr(Func::lower(Expr::col(user::Column::Username))).eq(username.to_lowercase()),
298+
)
297299
.one(db.as_ref())
298300
.await
299301
.map_err(|e| {

0 commit comments

Comments
 (0)