mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-20 03:07:53 -05:00
1e19cca7d9
Co-authored-by: Johannes <johannes@formbricks.com> Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
23 lines
714 B
TypeScript
23 lines
714 B
TypeScript
import "server-only";
|
|
import { IS_FORMBRICKS_CLOUD } from "@/lib/constants";
|
|
import {
|
|
hasOrganizationEntitlement,
|
|
hasOrganizationEntitlementWithLicenseGuard,
|
|
} from "@/modules/entitlements/lib/checks";
|
|
|
|
export const hasCloudEntitlement = async (
|
|
organizationId: string,
|
|
featureLookupKey: string
|
|
): Promise<boolean> => {
|
|
if (!IS_FORMBRICKS_CLOUD) return false;
|
|
return hasOrganizationEntitlement(organizationId, featureLookupKey);
|
|
};
|
|
|
|
export const hasCloudEntitlementWithLicenseGuard = async (
|
|
organizationId: string,
|
|
featureLookupKey: string
|
|
): Promise<boolean> => {
|
|
if (!IS_FORMBRICKS_CLOUD) return false;
|
|
return hasOrganizationEntitlementWithLicenseGuard(organizationId, featureLookupKey);
|
|
};
|