mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 13:08:17 -05:00
Fixing compiler complaints.
This commit is contained in:
parent
e86dd00da5
commit
f8b172ef32
@ -7,23 +7,26 @@ public interface IInviteUserOrganizationValidator : IValidator<InviteOrganizatio
|
||||
|
||||
public class InviteUserOrganizationValidator : IInviteUserOrganizationValidator
|
||||
{
|
||||
public async Task<ValidationResult<InviteOrganization>> ValidateAsync(InviteOrganization inviteOrganization)
|
||||
public Task<ValidationResult<InviteOrganization>> ValidateAsync(InviteOrganization inviteOrganization)
|
||||
{
|
||||
if (inviteOrganization.Seats is null)
|
||||
{
|
||||
return new Valid<InviteOrganization>(inviteOrganization);
|
||||
return Task.FromResult<ValidationResult<InviteOrganization>>(
|
||||
new Valid<InviteOrganization>(inviteOrganization));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(inviteOrganization.GatewayCustomerId))
|
||||
{
|
||||
return new Invalid<InviteOrganization>(new OrganizationNoPaymentMethodFoundError(inviteOrganization));
|
||||
return Task.FromResult<ValidationResult<InviteOrganization>>(
|
||||
new Invalid<InviteOrganization>(new OrganizationNoPaymentMethodFoundError(inviteOrganization)));
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(inviteOrganization.GatewaySubscriptionId))
|
||||
{
|
||||
return new Invalid<InviteOrganization>(new OrganizationNoSubscriptionFoundError(inviteOrganization));
|
||||
return Task.FromResult<ValidationResult<InviteOrganization>>(
|
||||
new Invalid<InviteOrganization>(new OrganizationNoSubscriptionFoundError(inviteOrganization)));
|
||||
}
|
||||
|
||||
return new Valid<InviteOrganization>(inviteOrganization);
|
||||
return Task.FromResult<ValidationResult<InviteOrganization>>(new Valid<InviteOrganization>(inviteOrganization));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user