diff --git a/.env-dist b/.env-dist index 19ba5580174..49c023ab92e 100755 --- a/.env-dist +++ b/.env-dist @@ -78,7 +78,6 @@ HIBP_BREACH_DOMAIN_BLOCKLIST=a-blocked-domain.com,another-blocked-domain.org ONEREP_API_BASE=https://api.onerep.com ONEREP_API_KEY= ONEREP_WEBHOOK_SECRET= -ONEREP_DATA_BROKER_COUNT=190 # Firefox Remote Settings FX_REMOTE_SETTINGS_WRITER_SERVER=https://settings-writer.prod.mozaws.net/v1 diff --git a/src/app/(proper_react)/redesign/(authenticated)/user/welcome/page.tsx b/src/app/(proper_react)/redesign/(authenticated)/user/welcome/page.tsx index 84feae8a841..35572cfa21f 100644 --- a/src/app/(proper_react)/redesign/(authenticated)/user/welcome/page.tsx +++ b/src/app/(proper_react)/redesign/(authenticated)/user/welcome/page.tsx @@ -5,7 +5,10 @@ import { getServerSession } from "next-auth"; import { SignInButton } from "../../../../../(nextjs_migration)/components/client/SignInButton"; import { redirect } from "next/navigation"; -import { isEligible } from "../../../../../functions/server/onerep"; +import { + isEligible, + ONEREP_DATA_BROKER_COUNT, +} from "../../../../../functions/server/onerep"; import { View } from "./View"; import { getAllBreachesCount } from "../../../../../../db/tables/breaches"; @@ -20,16 +23,12 @@ export default async function Onboarding() { return redirect("/redesign/user/dashboard/"); } - const dataBrokerCount = parseInt( - process.env.ONEREP_DATA_BROKER_COUNT as string, - 10 - ); const allBreachesCount = await getAllBreachesCount(); return ( ); diff --git a/src/app/functions/server/onerep.ts b/src/app/functions/server/onerep.ts index 6a1d223bb21..9596e92918a 100644 --- a/src/app/functions/server/onerep.ts +++ b/src/app/functions/server/onerep.ts @@ -83,6 +83,8 @@ export type RemovalStatus = | "waiting_for_verification" | "removed"; +export const ONEREP_DATA_BROKER_COUNT = 190; + async function onerepFetch( path: string, options: Parameters[1] = {}