Accounts can now be deleted
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package be.simplenotes.domain.usecases.users.register
|
||||
|
||||
import arrow.core.Either
|
||||
import be.simplenotes.domain.model.PersistedUser
|
||||
import be.simplenotes.domain.usecases.users.login.LoginForm
|
||||
import io.konform.validation.ValidationErrors
|
||||
|
||||
sealed class RegisterError
|
||||
object UserExists : RegisterError()
|
||||
class InvalidRegisterForm(val validationErrors: ValidationErrors) : RegisterError()
|
||||
|
||||
typealias RegisterForm = LoginForm
|
||||
|
||||
interface RegisterUseCase {
|
||||
fun register(form: RegisterForm): Either<RegisterError, PersistedUser>
|
||||
}
|
||||
Reference in New Issue
Block a user