create-auth-js-boiler
Version:
Create a new auth-js-boiler project
16 lines (13 loc) • 323 B
text/typescript
import { prisma } from "./prisma";
export const getTwoFactorConfirmationByUserId = async (userId: string) => {
try {
const twoFactorConfirmation = await prisma.twoFactorConfirmation.findUnique(
{
where: { userId },
},
);
return twoFactorConfirmation;
} catch {
return null;
}
};