Skip to content

Commit ce94aa7

Browse files
committed
reference verification type variable
1 parent 930737c commit ce94aa7

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

app/routes/settings+/profile.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
passwordSchema,
2727
usernameSchema,
2828
} from '~/utils/user-validation.ts'
29+
import { twoFAVerificationType } from './profile.two-factor.tsx'
2930

3031
const profileFormSchema = z.object({
3132
name: nameSchema.optional(),
@@ -50,7 +51,7 @@ export async function loader({ request }: DataFunctionArgs) {
5051
},
5152
})
5253
const twoFactorVerification = await prisma.verification.findFirst({
53-
where: { type: '2fa', target: userId },
54+
where: { type: twoFAVerificationType, target: userId },
5455
select: { id: true },
5556
})
5657
if (!user) {

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)