mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 09:32:48 -05:00
Add is sponsored item to subscription response
This commit is contained in:
@ -158,10 +158,15 @@ namespace Bit.Api.Controllers
|
||||
|
||||
var existingOrgSponsorship = await _organizationSponsorshipRepository
|
||||
.GetBySponsoringOrganizationUserIdAsync(orgUser.Id);
|
||||
if (existingOrgSponsorship == null || existingOrgSponsorship.SponsoredOrganizationId == null)
|
||||
if (existingOrgSponsorship == null)
|
||||
{
|
||||
throw new BadRequestException("You are not currently sponsoring an organization.");
|
||||
}
|
||||
if (existingOrgSponsorship.SponsoredOrganizationId == null)
|
||||
{
|
||||
await _organizationSponsorshipRepository.DeleteAsync(existingOrgSponsorship);
|
||||
return;
|
||||
}
|
||||
|
||||
var sponsoredOrganization = await _organizationRepository
|
||||
.GetByIdAsync(existingOrgSponsorship.SponsoredOrganizationId.Value);
|
||||
|
Reference in New Issue
Block a user