From 79324defcf114e53f4035df4a4ab6ab1d9b4053f Mon Sep 17 00:00:00 2001 From: chenhang Date: Fri, 3 Jul 2026 15:00:10 +0800 Subject: [PATCH] refactor(auth): remove username fallback --- src/data/repositories/auth_repository.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/data/repositories/auth_repository.ts b/src/data/repositories/auth_repository.ts index 76347c48..d28b68f8 100644 --- a/src/data/repositories/auth_repository.ts +++ b/src/data/repositories/auth_repository.ts @@ -76,7 +76,7 @@ export class AuthRepository implements IAuthRepository { LoginRequest.from( withTestAccountFlag({ email, - username: resolveLoginUsername(input.username, email), + username: input.username, password: input.password, platform: getAuthPlatform(), guestId: input.guestId ?? "", @@ -341,11 +341,3 @@ function withTestAccountFlag>( function getAuthPlatform(): string { return PlatformDetector.getPlatform(); } - -function resolveLoginUsername( - username: string | undefined, - email: string, -): string { - const trimmedUsername = username?.trim() ?? ""; - return trimmedUsername.length > 0 ? trimmedUsername : email; -}