1
0
mirror of https://github.com/bitwarden/server.git synced 2025-03-11 13:19:40 +01:00

[PM-12273] Integration page (#5119)

* add feature flag

* add rest endpoint to get plan type for organization
This commit is contained in:
Brandon Treston 2024-12-10 09:55:03 -05:00 committed by GitHub
parent 9e860104f2
commit 9c8f932149
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -540,4 +540,17 @@ public class OrganizationsController : Controller
await _organizationService.UpdateAsync(model.ToOrganization(organization, _featureService), eventType: EventType.Organization_CollectionManagement_Updated);
return new OrganizationResponseModel(organization);
}
[HttpGet("{id}/plan-type")]
public async Task<PlanType> GetPlanType(string id)
{
var orgIdGuid = new Guid(id);
var organization = await _organizationRepository.GetByIdAsync(orgIdGuid);
if (organization == null)
{
throw new NotFoundException();
}
return organization.PlanType;
}
}