Skip to content

Commit

Permalink
Trim usernames and password (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristhianescobar authored Oct 1, 2024
1 parent 8967399 commit c60d89d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ internal class LoginUseCaseImpl(
@Throws(KMMException::class, CancellationException::class)
override suspend fun logIn(email: String, password: String, humanVerificationCode: String) {
return mapErrorsSuspend {
return@mapErrorsSuspend repository.logIn(email, password, humanVerificationCode)
return@mapErrorsSuspend repository.logIn(email.trim(), password.trim(), humanVerificationCode)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ internal class SignupUseCaseImpl(private val repository: LogInRepository) : Sign
) {
mapErrorsSuspend {
val newUser = NewUser(
email = email,
newPassword = password,
confirmPassword = passwordConfirmation,
email = email.trim(),
newPassword = password.trim(),
confirmPassword = passwordConfirmation.trim(),
authCode = verificationCode
)
repository.registerUser(newUser, humanVerificationCode)
Expand Down

0 comments on commit c60d89d

Please sign in to comment.