mirror of
https://github.com/bitwarden/server.git
synced 2025-06-19 18:38: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
|
||||||
{
|
{
|
||||||
@ -28,11 +28,21 @@ public class AccountKeysRequestModel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return new UserAccountKeysData
|
if (SignatureKeyPair == null)
|
||||||
{
|
{
|
||||||
PublicKeyEncryptionKeyPairData = PublicKeyEncryptionKeyPair.ToPublicKeyEncryptionKeyPairData(),
|
return new UserAccountKeysData
|
||||||
SignatureKeyPairData = SignatureKeyPair.ToSignatureKeyPairData()
|
{
|
||||||
};
|
PublicKeyEncryptionKeyPairData = PublicKeyEncryptionKeyPair.ToPublicKeyEncryptionKeyPairData(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new UserAccountKeysData
|
||||||
|
{
|
||||||
|
PublicKeyEncryptionKeyPairData = PublicKeyEncryptionKeyPair.ToPublicKeyEncryptionKeyPairData(),
|
||||||
|
SignatureKeyPairData = SignatureKeyPair.ToSignatureKeyPairData()
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user