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:
29
src/Api/Models/Response/CipherResponseModel.cs
Normal file
29
src/Api/Models/Response/CipherResponseModel.cs
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user