1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-07 10:55:43 -05:00

created ciphers API controller. Moved import to ciphers controller.

This commit is contained in:
Kyle Spearrin
2016-06-07 20:05:27 -04:00
parent 585d7b4afd
commit 6861303586
5 changed files with 107 additions and 11 deletions

View File

@ -0,0 +1,29 @@
using System;
using Bit.Core.Domains;
namespace Bit.Api.Models
{
public class CipherResponseModel : ResponseModel
{
public CipherResponseModel(Cipher cipher)
: base("cipher")
{
if(cipher == null)
{
throw new ArgumentNullException(nameof(cipher));
}
Id = cipher.Id.ToString();
FolderId = cipher.FolderId?.ToString();
Type = cipher.Type;
Data = cipher.Data;
RevisionDate = cipher.RevisionDate;
}
public string Id { get; set; }
public string FolderId { get; set; }
public Core.Enums.CipherType Type { get; set; }
public string Data { get; set; }
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;
}
}