mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01: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)
|
||||
{
|
||||
return;
|
||||
if (sponsoredOrganization != null)
|
||||
{
|
||||
await _paymentService.RemoveOrganizationSponsorshipAsync(sponsoredOrganization, sponsorship);
|
||||
await _organizationRepository.UpsertAsync(sponsoredOrganization);
|
||||
await Task.CompletedTask; // this is intentional
|
||||
|
||||
try
|
||||
{
|
||||
if (sponsorship != null)
|
||||
{
|
||||
await _mailService.SendFamiliesForEnterpriseSponsorshipRevertingEmailAsync(
|
||||
sponsoredOrganization.BillingEmailAddress(),
|
||||
sponsorship.ValidUntil ?? DateTime.UtcNow.AddDays(15));
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, "Error sending Family sponsorship removed email.");
|
||||
}
|
||||
}
|
||||
await base.DeleteSponsorshipAsync(sponsorship);
|
||||
// if (sponsoredOrganization != null)
|
||||
// {
|
||||
// await _paymentService.RemoveOrganizationSponsorshipAsync(sponsoredOrganization, sponsorship);
|
||||
// await _organizationRepository.UpsertAsync(sponsoredOrganization);
|
||||
//
|
||||
// try
|
||||
// {
|
||||
// if (sponsorship != null)
|
||||
// {
|
||||
// await _mailService.SendFamiliesForEnterpriseSponsorshipRevertingEmailAsync(
|
||||
// sponsoredOrganization.BillingEmailAddress(),
|
||||
// sponsorship.ValidUntil ?? DateTime.UtcNow.AddDays(15));
|
||||
// }
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// _logger.LogError(e, "Error sending Family sponsorship removed email.");
|
||||
// }
|
||||
// }
|
||||
// await base.DeleteSponsorshipAsync(sponsorship);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user