mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01:00
Switch to sending org name in cloud invite (#2002)
This commit is contained in:
parent
2e2d3075d1
commit
6b484e29a7
@ -70,11 +70,13 @@ namespace Bit.Api.Controllers
|
||||
[SelfHosted(NotSelfHostedOnly = true)]
|
||||
public async Task CreateSponsorship(Guid sponsoringOrgId, [FromBody] OrganizationSponsorshipCreateRequestModel model)
|
||||
{
|
||||
var sponsoringOrg = await _organizationRepository.GetByIdAsync(sponsoringOrgId);
|
||||
|
||||
var sponsorship = await _createSponsorshipCommand.CreateSponsorshipAsync(
|
||||
await _organizationRepository.GetByIdAsync(sponsoringOrgId),
|
||||
sponsoringOrg,
|
||||
await _organizationUserRepository.GetByOrganizationAsync(sponsoringOrgId, _currentContext.UserId ?? default),
|
||||
model.PlanSponsorshipType, model.SponsoredEmail, model.FriendlyName);
|
||||
await _sendSponsorshipOfferCommand.SendSponsorshipOfferAsync(sponsorship, (await CurrentUser).Email);
|
||||
await _sendSponsorshipOfferCommand.SendSponsorshipOfferAsync(sponsorship, sponsoringOrg.Name);
|
||||
}
|
||||
|
||||
[Authorize("Application")]
|
||||
|
Loading…
Reference in New Issue
Block a user