mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
created ciphers API controller. Moved import to ciphers controller.
This commit is contained in:
@ -32,6 +32,5 @@
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string Notes { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,6 @@ namespace Bit.Api.Models
|
||||
{
|
||||
public FolderRequestModel[] Folders { get; set; }
|
||||
public SiteRequestModel[] Sites { get; set; }
|
||||
public KeyValuePair<int, int>[] SiteRelationships { get; set; }
|
||||
public KeyValuePair<int, int>[] FolderRelationships { get; set; }
|
||||
}
|
||||
}
|
||||
|
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