UpdateEmailUseCase

class UpdateEmailUseCase(accountRepository: AccountRepository)

Updates the user's email address. keep in mind that this use case does not update the email immediately, it only sends a request to the backend. the use need to confirm the email change by clicking on the link in an email they receive.

Return

Result.Success if the email was updated successfully.

Result.Failure.InvalidEmail if the email is invalid.

Result.Failure.EmailAlreadyInUse if the email is already in use.

Result.Failure.GenericFailure if the email update failed for any other reason.

Parameters

email

The new email address.

See also

UserRepository.updateSelfEmail

Constructors

Link copied to clipboard
internal constructor(accountRepository: AccountRepository)

Types

Link copied to clipboard
interface Result

Functions

Link copied to clipboard
suspend operator fun invoke(email: String): UpdateEmailUseCase.Result