ChangeUserPassword

Changes the current password Params.currentPassword of the user with the new one provided Params.newPassword. If the user is not logged in it returns an instance of Either.Left containing AppError.Unauthorized

Constructors

Link copied to clipboard
constructor(validateUserPassword: ValidateUserPassword, userRepository: UserRepository)

Types

Link copied to clipboard
data class Params(val currentPassword: String, val newPassword: String)

Functions

Link copied to clipboard
suspend operator fun invoke(params: ChangeUserPassword.Params): Either<AppError, Unit>
Link copied to clipboard
suspend operator fun <Res> AsyncUseCase<Unit, Res>.invoke(): Res

Utility method to avoid passing Unit argument to invoke