mirror of
https://github.com/bitwarden/server.git
synced 2025-06-20 02:48:03 -05:00
Fix cases for request data conversion
This commit is contained in:
parent
54aac8cfc4
commit
dbb4aca1e2
@ -15,7 +15,7 @@ public class AccountKeysRequestModel
|
|||||||
public UserAccountKeysData ToAccountKeysData()
|
public UserAccountKeysData ToAccountKeysData()
|
||||||
{
|
{
|
||||||
// This will be cleaned up, after a compatibility period, at which point PublicKeyEncryptionKeyPair and SignatureKeyPair will be required.
|
// This will be cleaned up, after a compatibility period, at which point PublicKeyEncryptionKeyPair and SignatureKeyPair will be required.
|
||||||
if (PublicKeyEncryptionKeyPair == null || SignatureKeyPair == null)
|
if (PublicKeyEncryptionKeyPair == null)
|
||||||
{
|
{
|
||||||
return new UserAccountKeysData
|
return new UserAccountKeysData
|
||||||
{
|
{
|
||||||
@ -27,6 +27,15 @@ public class AccountKeysRequestModel
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (SignatureKeyPair == null)
|
||||||
|
{
|
||||||
|
return new UserAccountKeysData
|
||||||
|
{
|
||||||
|
PublicKeyEncryptionKeyPairData = PublicKeyEncryptionKeyPair.ToPublicKeyEncryptionKeyPairData(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return new UserAccountKeysData
|
return new UserAccountKeysData
|
||||||
{
|
{
|
||||||
@ -36,3 +45,4 @@ public class AccountKeysRequestModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user