mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 08:32:50 -05:00
move all models into core
This commit is contained in:
@ -1,32 +0,0 @@
|
||||
using System;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Api.Models
|
||||
{
|
||||
public class FolderResponseModel : ResponseModel
|
||||
{
|
||||
public FolderResponseModel(Cipher cipher, Guid userId)
|
||||
: base("folder")
|
||||
{
|
||||
if(cipher == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(cipher));
|
||||
}
|
||||
|
||||
if(cipher.Type != Core.Enums.CipherType.Folder)
|
||||
{
|
||||
throw new ArgumentException(nameof(cipher.Type));
|
||||
}
|
||||
|
||||
var data = new FolderDataModel(cipher);
|
||||
|
||||
Id = cipher.Id.ToString();
|
||||
Name = data.Name;
|
||||
RevisionDate = cipher.RevisionDate;
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public DateTime RevisionDate { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user