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

Moved models and removed deuplicate error for username since we use emails as username as well.

This commit is contained in:
Kyle Spearrin
2016-03-08 21:20:56 -05:00
parent 8b2186989f
commit 994f27ff40
6 changed files with 1 additions and 1 deletions

View File

@ -0,0 +1,31 @@
using System;
using System.ComponentModel.DataAnnotations;
using Bit.Api.Utilities;
using Bit.Core.Domains;
namespace Bit.Api.Models
{
public class FolderRequestModel
{
[Required]
[EncryptedString]
[StringLength(300)]
public string Name { get; set; }
public Folder ToFolder(string userId = null)
{
return new Folder
{
UserId = userId,
Name = Name
};
}
public Folder ToFolder(Folder existingFolder)
{
existingFolder.Name = Name;
return existingFolder;
}
}
}