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

Getting rid of CipherDataModel in favor of more specific models. Optimizations to model transformations.

This commit is contained in:
Kyle Spearrin
2016-06-08 22:00:31 -04:00
parent 89e524e1e4
commit ed0c6ad795
9 changed files with 124 additions and 71 deletions

View File

@ -1,6 +1,5 @@
using System;
using Bit.Core.Domains;
using Newtonsoft.Json;
namespace Bit.Api.Models
{
@ -19,7 +18,7 @@ namespace Bit.Api.Models
throw new ArgumentException(nameof(cipher.Type));
}
var data = JsonConvert.DeserializeObject<CipherDataModel>(cipher.Data);
var data = new FolderDataModel(cipher);
Id = cipher.Id.ToString();
Name = data.Name;