1
0
mirror of https://github.com/bitwarden/server synced 2025-12-26 21:23:39 +00:00

Stephon's feedback

This commit is contained in:
Alex Morask
2025-09-03 11:32:41 -05:00
parent b752bab91d
commit ab3c7c5bbe

View File

@@ -42,14 +42,8 @@ public class SetupIntentSucceededHandler(
var organization = await organizationRepository.GetByIdAsync(subscriberId.Value);
var provider = await providerRepository.GetByIdAsync(subscriberId.Value);
if (organization != null)
{
await SetPaymentMethodAsync(organization, setupIntent.PaymentMethod);
}
else if (provider != null)
{
await SetPaymentMethodAsync(provider, setupIntent.PaymentMethod);
}
OneOf<Organization, Provider> entity = organization != null ? organization : provider!;
await SetPaymentMethodAsync(entity, setupIntent.PaymentMethod);
}
private async Task SetPaymentMethodAsync(