1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

Add resend sponsorship offer api endpoint

This commit is contained in:
Matt Gibson
2021-11-10 17:00:48 -05:00
committed by Justin Baur
parent a605dc7286
commit 32333048b4
5 changed files with 172 additions and 24 deletions

View File

@ -91,6 +91,7 @@ namespace Bit.Core.Services
{
sponsorship = await _organizationSponsorshipRepository.CreateAsync(sponsorship);
await SendSponsorshipOfferAsync(sponsoringOrg, sponsorship);
await _mailService.SendFamiliesForEnterpriseOfferEmailAsync(sponsoredEmail, sponsoringOrg.Name,
RedemptionToken(sponsorship.Id, sponsorshipType));
}
@ -104,6 +105,12 @@ namespace Bit.Core.Services
}
}
public async Task SendSponsorshipOfferAsync(Organization sponsoringOrg, OrganizationSponsorship sponsorship)
{
await _mailService.SendFamiliesForEnterpriseOfferEmailAsync(sponsorship.OfferedToEmail, sponsoringOrg.Name,
RedemptionToken(sponsorship.Id, sponsorship.PlanSponsorshipType.Value));
}
public async Task SetUpSponsorshipAsync(OrganizationSponsorship sponsorship, Organization sponsoredOrganization)
{
if (sponsorship.PlanSponsorshipType == null)