1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 08:32:50 -05:00

pub/priv keys and share updates

This commit is contained in:
Kyle Spearrin
2017-02-21 00:27:32 -05:00
parent 47da65be5f
commit 9ca2baba74
10 changed files with 13 additions and 49 deletions

View File

@ -26,16 +26,6 @@ namespace Bit.Api.Models
Id = cipher.Id.ToString();
Name = data.Name;
RevisionDate = cipher.RevisionDate;
if(!string.IsNullOrWhiteSpace(cipher.Shares))
{
var shares = JsonConvert.DeserializeObject<IEnumerable<Cipher.Share>>(cipher.Shares);
var userShare = shares.FirstOrDefault(s => s.UserId == userId);
if(userShare != null)
{
Key = userShare.Key;
}
}
}
public string Id { get; set; }