mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05:00
24 lines
545 B
C#
24 lines
545 B
C#
using Bit.Core.Domains;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Bit.Api.Models
|
|
{
|
|
public class KeysRequestModel
|
|
{
|
|
public string PublicKey { get; set; }
|
|
[Required]
|
|
public string PrivateKey { get; set; }
|
|
|
|
public User ToUser(User existingUser)
|
|
{
|
|
if(!string.IsNullOrWhiteSpace(PublicKey))
|
|
{
|
|
existingUser.PublicKey = PublicKey;
|
|
}
|
|
|
|
existingUser.PrivateKey = PrivateKey;
|
|
return existingUser;
|
|
}
|
|
}
|
|
}
|