This commit is contained in:
Anshuman Pandey
2024-06-14 21:02:28 +05:30
committed by GitHub
parent f3906cab55
commit 1223a30127
2 changed files with 5 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ import { IS_FORMBRICKS_CLOUD } from "@formbricks/lib/constants";
import { getEnvironment } from "@formbricks/lib/environment/service";
import { reverseTranslateSurvey } from "@formbricks/lib/i18n/reverseTranslation";
import {
getMonthlyActiveOrganizationPeopleCount,
// getMonthlyActiveOrganizationPeopleCount,
getMonthlyOrganizationResponseCount,
getOrganizationByEnvironmentId,
} from "@formbricks/lib/organization/service";
@@ -47,7 +47,8 @@ export const getUpdatedState = async (environmentId: string, personId?: string):
// check if Monthly Active Users limit is reached
if (IS_FORMBRICKS_CLOUD) {
const currentMau = await getMonthlyActiveOrganizationPeopleCount(organization.id);
// const currentMau = await getMonthlyActiveOrganizationPeopleCount(organization.id);
const currentMau = 0;
const monthlyMiuLimit = organization.billing.limits.monthly.miu;
const isMauLimitReached = monthlyMiuLimit !== null && currentMau >= monthlyMiuLimit;

View File

@@ -10,7 +10,6 @@ import { getAttributes } from "@formbricks/lib/attribute/service";
import { IS_FORMBRICKS_CLOUD } from "@formbricks/lib/constants";
import { getEnvironment, updateEnvironment } from "@formbricks/lib/environment/service";
import {
getMonthlyActiveOrganizationPeopleCount,
getMonthlyOrganizationResponseCount,
getOrganizationByEnvironmentId,
} from "@formbricks/lib/organization/service";
@@ -86,7 +85,8 @@ export const GET = async (
let isMonthlyResponsesLimitReached = false;
if (IS_FORMBRICKS_CLOUD) {
const currentMau = await getMonthlyActiveOrganizationPeopleCount(organization.id);
// const currentMau = await getMonthlyActiveOrganizationPeopleCount(organization.id);
const currentMau = 0;
const monthlyResponseLimit = organization.billing.limits.monthly.responses;
const monthlyMiuLimit = organization.billing.limits.monthly.miu;