Skip to content

Commit

Permalink
chore: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
JuroUhlar committed Jul 2, 2024
1 parent 430be7c commit db199aa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion src/app/playground/components/VpnDetectionResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const VpnDetectionResult: FunctionComponent<{ event: EventResponse | undefined }
const reasons = [
VpnData.methods?.publicVPN ? 'public VPN IP' : undefined,
VpnData.methods?.timezoneMismatch ? 'timezone mismatch' : undefined,
// @ts-expect-error Remove when Node SDK includes new osMismatch property
VpnData.methods?.osMismatch ? 'OS mismatch' : undefined,
].filter(Boolean);
const reasonsString = reasons.length > 0 ? ` (${reasons.join(', ')})` : '';
Expand Down
6 changes: 1 addition & 5 deletions src/app/vpn-detection/api/activate-ppp/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ export async function POST(req: Request): Promise<NextResponse<ActivateRegionalP
* (timezone mismatch is false)
* So we still return a successful response while acknowledging the result.
*/
if (
// @ts-expect-error Remove when Node SDK includes new osMismatch property
vpnDetection?.methods?.osMismatch === true &&
vpnDetection.methods.timezoneMismatch === false
) {
if (vpnDetection?.methods?.osMismatch === true && vpnDetection.methods.timezoneMismatch === false) {
const privateRelayNote =
'It looks like you are using an IP anonymizing service (for example, Apple Private relay) without changing your location. You still get the discount!';
return NextResponse.json(
Expand Down

0 comments on commit db199aa

Please sign in to comment.