1
0
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:
Kyle Spearrin 2017-09-27 21:55:39 -04:00
parent da5fb32fe8
commit 825f7b8bb9

View File

@ -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;
}
}