mirror of
https://github.com/bitwarden/server
synced 2025-12-11 22:03:38 +00:00
* chore: set up a `CODEOWNERS` space for platform * chore: move sql objects for `Installation` to platform's domain * chore: move `Installation` and `PushRelay` code to platform's domain
24 lines
510 B
C#
24 lines
510 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Bit.Core.Platform.Installations;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Api.Platform.Installations;
|
|
|
|
public class InstallationRequestModel
|
|
{
|
|
[Required]
|
|
[EmailAddress]
|
|
[StringLength(256)]
|
|
public string Email { get; set; }
|
|
|
|
public Installation ToInstallation()
|
|
{
|
|
return new Installation
|
|
{
|
|
Key = CoreHelpers.SecureRandomString(20),
|
|
Email = Email,
|
|
Enabled = true
|
|
};
|
|
}
|
|
}
|