diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/Organization/InviteUserOrganizationValidator.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/Organization/InviteUserOrganizationValidator.cs index 730fa5bde7..14b75bb7ee 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/Organization/InviteUserOrganizationValidator.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/Organization/InviteUserOrganizationValidator.cs @@ -7,23 +7,26 @@ public interface IInviteUserOrganizationValidator : IValidator> ValidateAsync(InviteOrganization inviteOrganization) + public Task> ValidateAsync(InviteOrganization inviteOrganization) { if (inviteOrganization.Seats is null) { - return new Valid(inviteOrganization); + return Task.FromResult>( + new Valid(inviteOrganization)); } if (string.IsNullOrWhiteSpace(inviteOrganization.GatewayCustomerId)) { - return new Invalid(new OrganizationNoPaymentMethodFoundError(inviteOrganization)); + return Task.FromResult>( + new Invalid(new OrganizationNoPaymentMethodFoundError(inviteOrganization))); } if (string.IsNullOrWhiteSpace(inviteOrganization.GatewaySubscriptionId)) { - return new Invalid(new OrganizationNoSubscriptionFoundError(inviteOrganization)); + return Task.FromResult>( + new Invalid(new OrganizationNoSubscriptionFoundError(inviteOrganization))); } - return new Valid(inviteOrganization); + return Task.FromResult>(new Valid(inviteOrganization)); } }