Skip to content

Commit

Permalink
Merge branch 'main' into mntor-1809-scan-banner
Browse files Browse the repository at this point in the history
  • Loading branch information
codemist authored Jul 26, 2023
2 parents 2dce8fc + fc2d8a7 commit 3ad5937
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion .env-dist
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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 (
<View
user={session.user}
dataBrokerCount={dataBrokerCount}
dataBrokerCount={ONEREP_DATA_BROKER_COUNT}
breachesTotalCount={allBreachesCount}
/>
);
Expand Down
2 changes: 2 additions & 0 deletions src/app/functions/server/onerep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof fetch>[1] = {}
Expand Down

0 comments on commit 3ad5937

Please sign in to comment.