Accounts can now be deleted
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package be.simplenotes.domain.usecases.users.delete
|
||||
|
||||
import arrow.core.Either
|
||||
import io.konform.validation.ValidationErrors
|
||||
|
||||
sealed class DeleteError {
|
||||
object Unregistered : DeleteError()
|
||||
object WrongPassword : DeleteError()
|
||||
class InvalidForm(val validationErrors: ValidationErrors) : DeleteError()
|
||||
}
|
||||
|
||||
data class DeleteForm(val username: String?, val password: String?, val checked: Boolean)
|
||||
|
||||
interface DeleteUseCase {
|
||||
fun delete(form: DeleteForm): Either<DeleteError, Unit>
|
||||
}
|
||||
Reference in New Issue
Block a user