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

initial commit of source

This commit is contained in:
Kyle Spearrin
2015-12-08 22:57:38 -05:00
commit 437b971003
87 changed files with 3819 additions and 0 deletions

View File

@ -0,0 +1,24 @@
using System.ComponentModel.DataAnnotations;
using Bit.Core.Domains;
namespace Bit.Api.Models
{
public class UpdateProfileRequestModel
{
[Required]
public string Name { get; set; }
public string MasterPasswordHint { get; set; }
[Required]
[RegularExpression("^[a-z]{2}-[A-Z]{2}$")]
public string Culture { get; set; }
public User ToUser(User existingUser)
{
existingUser.Name = Name;
existingUser.MasterPasswordHint = string.IsNullOrWhiteSpace(MasterPasswordHint) ? null : MasterPasswordHint;
existingUser.Culture = Culture;
return existingUser;
}
}
}