Files
formbricks/packages/ee/lib/service.ts
T
2023-11-09 10:06:57 +00:00

17 lines
411 B
TypeScript

import "server-only";
import { unstable_cache } from "next/cache";
import { ENTERPRISE_LICENSE_KEY } from "@formbricks/lib/constants";
export const getIsEnterpriseEdition = () =>
unstable_cache(
async () => {
if (ENTERPRISE_LICENSE_KEY) {
return ENTERPRISE_LICENSE_KEY?.length > 0;
}
return false;
},
["getIsEnterpriseEdition"],
{ revalidate: 60 * 60 * 24 }
)();