mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05:00
Commented out unreachable code (#4735)
* Commented out unreachable code * Suppressed compiler warning "async method lacks await"
This commit is contained in:
parent
371d51b9c8
commit
b6075dff52
@ -143,27 +143,28 @@ public class ValidateSponsorshipCommand : CancelSponsorshipCommand, IValidateSpo
|
|||||||
|
|
||||||
private async Task CancelSponsorshipAsync(Organization sponsoredOrganization, OrganizationSponsorship sponsorship = null)
|
private async Task CancelSponsorshipAsync(Organization sponsoredOrganization, OrganizationSponsorship sponsorship = null)
|
||||||
{
|
{
|
||||||
return;
|
await Task.CompletedTask; // this is intentional
|
||||||
if (sponsoredOrganization != null)
|
|
||||||
{
|
|
||||||
await _paymentService.RemoveOrganizationSponsorshipAsync(sponsoredOrganization, sponsorship);
|
|
||||||
await _organizationRepository.UpsertAsync(sponsoredOrganization);
|
|
||||||
|
|
||||||
try
|
// if (sponsoredOrganization != null)
|
||||||
{
|
// {
|
||||||
if (sponsorship != null)
|
// await _paymentService.RemoveOrganizationSponsorshipAsync(sponsoredOrganization, sponsorship);
|
||||||
{
|
// await _organizationRepository.UpsertAsync(sponsoredOrganization);
|
||||||
await _mailService.SendFamiliesForEnterpriseSponsorshipRevertingEmailAsync(
|
//
|
||||||
sponsoredOrganization.BillingEmailAddress(),
|
// try
|
||||||
sponsorship.ValidUntil ?? DateTime.UtcNow.AddDays(15));
|
// {
|
||||||
}
|
// if (sponsorship != null)
|
||||||
}
|
// {
|
||||||
catch (Exception e)
|
// await _mailService.SendFamiliesForEnterpriseSponsorshipRevertingEmailAsync(
|
||||||
{
|
// sponsoredOrganization.BillingEmailAddress(),
|
||||||
_logger.LogError(e, "Error sending Family sponsorship removed email.");
|
// sponsorship.ValidUntil ?? DateTime.UtcNow.AddDays(15));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
await base.DeleteSponsorshipAsync(sponsorship);
|
// catch (Exception e)
|
||||||
|
// {
|
||||||
|
// _logger.LogError(e, "Error sending Family sponsorship removed email.");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// await base.DeleteSponsorshipAsync(sponsorship);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user