mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -05:00
PM-10600: Revert global push notifications
This commit is contained in:
@ -12,12 +12,11 @@ public class PushSendRequestModel : IValidatableObject
|
||||
public string? Identifier { get; set; }
|
||||
[Required] public PushType Type { get; set; }
|
||||
[Required] public object Payload { get; set; } = null!;
|
||||
public bool Global { get; set; }
|
||||
public ClientType? ClientType { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(UserId) && string.IsNullOrWhiteSpace(OrganizationId) && !Global)
|
||||
if (string.IsNullOrWhiteSpace(UserId) && string.IsNullOrWhiteSpace(OrganizationId))
|
||||
{
|
||||
yield return new ValidationResult($"{nameof(UserId)} or {nameof(OrganizationId)} is required.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user