From 9c8f932149f647d0a6153f82417b6effb0e36fca Mon Sep 17 00:00:00 2001 From: Brandon Treston Date: Tue, 10 Dec 2024 09:55:03 -0500 Subject: [PATCH] [PM-12273] Integration page (#5119) * add feature flag * add rest endpoint to get plan type for organization --- .../Controllers/OrganizationsController.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Api/AdminConsole/Controllers/OrganizationsController.cs b/src/Api/AdminConsole/Controllers/OrganizationsController.cs index 226fe83c73..4e01bb3451 100644 --- a/src/Api/AdminConsole/Controllers/OrganizationsController.cs +++ b/src/Api/AdminConsole/Controllers/OrganizationsController.cs @@ -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 GetPlanType(string id) + { + var orgIdGuid = new Guid(id); + var organization = await _organizationRepository.GetByIdAsync(orgIdGuid); + if (organization == null) + { + throw new NotFoundException(); + } + + return organization.PlanType; + } }