mirror of
https://github.com/bitwarden/server
synced 2026-02-13 23:13:22 +00:00
23 lines
800 B
C#
23 lines
800 B
C#
// FIXME: Update this file to be null safe and then delete the line below
|
|
#nullable disable
|
|
|
|
using System.Text.Json;
|
|
using Bit.Core.Entities;
|
|
using Bit.Core.Enums;
|
|
|
|
namespace Bit.Api.Models.Request;
|
|
|
|
public class UpdateDomainsRequestModel
|
|
{
|
|
public IEnumerable<IEnumerable<string>> EquivalentDomains { get; set; }
|
|
public IEnumerable<GlobalEquivalentDomainsType> ExcludedGlobalEquivalentDomains { get; set; }
|
|
|
|
public User ToUser(User existingUser)
|
|
{
|
|
existingUser.EquivalentDomains = EquivalentDomains != null ? JsonSerializer.Serialize(EquivalentDomains) : null;
|
|
existingUser.ExcludedGlobalEquivalentDomains = ExcludedGlobalEquivalentDomains != null ?
|
|
JsonSerializer.Serialize(ExcludedGlobalEquivalentDomains) : null;
|
|
return existingUser;
|
|
}
|
|
}
|