Make the passwordHash nullable on the organizationResetPasswordEnroll API (#1247)

This commit is contained in:
David Perez 2024-04-09 10:12:57 -05:00 committed by Álison Fernandes
parent 92e39f25c1
commit 05d1607024
3 changed files with 5 additions and 4 deletions

View file

@ -6,11 +6,12 @@ import kotlinx.serialization.Serializable
/**
* Request body object when enrolling a user in reset password functionality for this organization.
*
* @param passwordHash The hash of this user's password.
* @param passwordHash The hash of this user's password. This is not required if the user does not
* have a password.
* @param resetPasswordKey The key used for password reset.
*/
@Serializable
data class OrganizationResetPasswordEnrollRequestJson(
@SerialName("masterPasswordHash") val passwordHash: String,
@SerialName("masterPasswordHash") val passwordHash: String?,
@SerialName("resetPasswordKey") val resetPasswordKey: String,
)

View file

@ -14,7 +14,7 @@ interface OrganizationService {
suspend fun organizationResetPasswordEnroll(
organizationId: String,
userId: String,
passwordHash: String,
passwordHash: String?,
resetPasswordKey: String,
): Result<Unit>

View file

@ -18,7 +18,7 @@ class OrganizationServiceImpl(
override suspend fun organizationResetPasswordEnroll(
organizationId: String,
userId: String,
passwordHash: String,
passwordHash: String?,
resetPasswordKey: String,
): Result<Unit> = authenticatedOrganizationApi
.organizationResetPasswordEnroll(