mirror of
https://github.com/bitwarden/server.git
synced 2024-12-24 17:17:40 +01:00
proper ToCipher on CipherWithIdRequestModel
This commit is contained in:
parent
da5fb32fe8
commit
825f7b8bb9
@ -110,16 +110,6 @@ namespace Bit.Core.Models.Api
|
|||||||
return existingCipher;
|
return existingCipher;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CipherDetails ToOrganizationCipherDetails(Guid orgId)
|
|
||||||
{
|
|
||||||
return ToCipherDetails(new CipherDetails
|
|
||||||
{
|
|
||||||
Type = Type,
|
|
||||||
OrganizationId = orgId,
|
|
||||||
Edit = true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public Cipher ToOrganizationCipher()
|
public Cipher ToOrganizationCipher()
|
||||||
{
|
{
|
||||||
if(string.IsNullOrWhiteSpace(OrganizationId))
|
if(string.IsNullOrWhiteSpace(OrganizationId))
|
||||||
@ -186,11 +176,9 @@ namespace Bit.Core.Models.Api
|
|||||||
|
|
||||||
public Cipher ToCipher(Guid userId)
|
public Cipher ToCipher(Guid userId)
|
||||||
{
|
{
|
||||||
return ToCipherDetails(new CipherDetails
|
var cipher = ToCipherDetails(userId);
|
||||||
{
|
cipher.Id = new Guid(Id);
|
||||||
UserId = userId,
|
return cipher;
|
||||||
Id = new Guid(Id)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user