Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix broken signup

Blue Mouseedc8ba99bdb5
diff --git a/web/app/api/index.ts b/web/app/api/index.ts
index 289fbb577..2adffb0e1 100644
--- a/web/app/api/index.ts
+++ b/web/app/api/index.ts
@@ -111,7 +111,7 @@ export const login = (credentials: { email: string; password: string }) =>
throw _isEmpty(error.response.data?.message) ? error.response.data : error.response.data.message
})
-export const signup = (data: { email: string; password: string; refCode?: string }) =>
+export const signup = (data: { email: string; password: string; refCode?: string; checkIfLeaked?: boolean }) =>
api
.post('v1/auth/register', data)
.then((response): Auth => response.data)
diff --git a/web/app/pages/Auth/Signup/Signup.tsx b/web/app/pages/Auth/Signup/Signup.tsx
index fb51a1498..1add1bd6d 100644
--- a/web/app/pages/Auth/Signup/Signup.tsx
+++ b/web/app/pages/Auth/Signup/Signup.tsx
@@ -3,7 +3,6 @@ import { Link, useNavigate } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
import _size from 'lodash/size'
import _keys from 'lodash/keys'
-import _omit from 'lodash/omit'
import _isEmpty from 'lodash/isEmpty'
import { getAccessToken, setAccessToken } from '~/utils/accessToken'
@@ -127,7 +126,9 @@ const Signup = ({ ssrTheme }: SignupProps) => {
const refCode = getCookie(REFERRAL_COOKIE)
const { user, accessToken, refreshToken } = await signup({
- ..._omit(data, ['dontRemember']),
+ email: data.email,
+ password: data.password,
+ checkIfLeaked: data.checkIfLeaked,
refCode: refCode || undefined,
})