mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-07 03:11:47 -05:00
chore: remove unused method and restructure env var fetching for team roles (#1595)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
This commit is contained in:
committed by
GitHub
parent
dd0f0ead39
commit
a34606ab03
@@ -1,10 +1,7 @@
|
||||
import "server-only";
|
||||
|
||||
import { env } from "../../../apps/web/env.mjs";
|
||||
import { unstable_cache } from "next/cache";
|
||||
|
||||
// Enterprise License constant
|
||||
export const ENTERPRISE_LICENSE_KEY = env.ENTERPRISE_LICENSE_KEY;
|
||||
import { ENTERPRISE_LICENSE_KEY } from "@formbricks/lib/constants";
|
||||
|
||||
export const getIsEnterpriseEdition = () =>
|
||||
unstable_cache(
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import "server-only";
|
||||
import path from "path";
|
||||
import { env } from "@/env.mjs";
|
||||
import { unstable_cache } from "next/cache";
|
||||
|
||||
export const IS_FORMBRICKS_CLOUD = process.env.IS_FORMBRICKS_CLOUD === "1";
|
||||
export const REVALIDATION_INTERVAL = 0; //TODO: find a good way to cache and revalidate data when it changes
|
||||
@@ -85,16 +83,4 @@ export const LOCAL_UPLOAD_URL = {
|
||||
export const PRICING_USERTARGETING_FREE_MTU = 2500;
|
||||
export const PRICING_APPSURVEYS_FREE_RESPONSES = 250;
|
||||
// Enterprise License constant
|
||||
export const ENTERPRISE_LICENSE_KEY = env.ENTERPRISE_LICENSE_KEY;
|
||||
|
||||
export const getIsEnterpriseEdition = () =>
|
||||
unstable_cache(
|
||||
async () => {
|
||||
if (ENTERPRISE_LICENSE_KEY) {
|
||||
return ENTERPRISE_LICENSE_KEY?.length > 0;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
["isEE"],
|
||||
{ revalidate: 60 * 60 * 24 }
|
||||
)();
|
||||
export const ENTERPRISE_LICENSE_KEY = process.env.ENTERPRISE_LICENSE_KEY;
|
||||
|
||||
Reference in New Issue
Block a user