Add generic save method

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-07-23 16:03:43 +02:00
parent c4c183ac39
commit d7654f8476
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -143,6 +143,12 @@ class UserManager internal constructor(private val userRepository: UsersReposito
}
}
fun saveUser(user: User): Single<Int> {
return Single.fromCallable {
userRepository.updateUser(user)
}
}
fun setUserAsActive(user: User): Single<Boolean> {
return userRepository.setUserAsActiveWithId(user.id!!)
}