Files
server/src/Api/Models/Request/InstallationRequestModel.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
488 B
C#
Raw Normal View History

2021-12-14 15:05:07 +00:00
using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities;
2021-12-14 15:05:07 +00:00
using Bit.Core.Utilities;
2017-08-15 16:31:19 -04:00
2021-12-14 15:05:07 +00:00
namespace Bit.Api.Models.Request;
2022-08-29 16:06:55 -04:00
2017-08-15 16:31:19 -04:00
public class InstallationRequestModel
{
[Required]
[EmailAddress]
[StringLength(256)]
2017-08-15 16:31:19 -04:00
public string Email { get; set; }
2017-08-15 16:31:19 -04:00
public Installation ToInstallation()
2022-08-29 16:06:55 -04:00
{
2017-08-15 16:31:19 -04:00
return new Installation
{
2021-12-14 15:05:07 +00:00
Key = CoreHelpers.SecureRandomString(20),
2017-08-15 16:31:19 -04:00
Email = Email,
Enabled = true
};
}
}