From 825f7b8bb96a36be9012f98b99b86f15cbf8b6e1 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 27 Sep 2017 21:55:39 -0400 Subject: [PATCH] proper ToCipher on CipherWithIdRequestModel --- .../Models/Api/Request/CipherRequestModel.cs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/Core/Models/Api/Request/CipherRequestModel.cs b/src/Core/Models/Api/Request/CipherRequestModel.cs index b6ced71488..d0c6ff4772 100644 --- a/src/Core/Models/Api/Request/CipherRequestModel.cs +++ b/src/Core/Models/Api/Request/CipherRequestModel.cs @@ -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; } }