Update getPlan with workspace-specific consideration and add environmentLimit to returned plan

This commit is contained in:
Tuan Dang
2023-06-14 11:52:48 +01:00
parent 776cecc3ef
commit 92647341a9
5 changed files with 22 additions and 12 deletions
@@ -99,7 +99,7 @@ export const inviteUserToOrganization = async (req: Request, res: Response) => {
throw new Error('Failed to validate organization membership');
}
const plan = await EELicenseService.getOrganizationPlan(organizationId);
const plan = await EELicenseService.getPlan(organizationId);
if (plan.memberLimit !== null) {
// case: limit imposed on number of members allowed