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;
|
||||
}
|
||||
|
||||
public CipherDetails ToOrganizationCipherDetails(Guid orgId)
|
||||
{
|
||||
return ToCipherDetails(new CipherDetails
|
||||
{
|
||||
Type = Type,
|
||||
OrganizationId = orgId,
|
||||
Edit = true
|
||||
});
|
||||
}
|
||||
|
||||
public Cipher ToOrganizationCipher()
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(OrganizationId))
|
||||
@ -186,11 +176,9 @@ namespace Bit.Core.Models.Api
|
||||
|
||||
public Cipher ToCipher(Guid userId)
|
||||
{
|
||||
return ToCipherDetails(new CipherDetails
|
||||
{
|
||||
UserId = userId,
|
||||
Id = new Guid(Id)
|
||||
});
|
||||
var cipher = ToCipherDetails(userId);
|
||||
cipher.Id = new Guid(Id);
|
||||
return cipher;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user