mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
chore: move Installation
and Push
to platform's domain folders (#5085)
* 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
This commit is contained in:
@ -1,23 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Api.Models.Request;
|
||||
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Models.Api;
|
||||
|
||||
namespace Bit.Api.Models.Response;
|
||||
|
||||
public class InstallationResponseModel : ResponseModel
|
||||
{
|
||||
public InstallationResponseModel(Installation installation, bool withKey)
|
||||
: base("installation")
|
||||
{
|
||||
Id = installation.Id;
|
||||
Key = withKey ? installation.Key : null;
|
||||
Enabled = installation.Enabled;
|
||||
}
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public string Key { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
}
|
Reference in New Issue
Block a user