mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
fix: add layout and minor updates
This commit is contained in:
18
packages/lib/server-only/user/get-reset-token-validity.ts
Normal file
18
packages/lib/server-only/user/get-reset-token-validity.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
type GetResetTokenValidityOptions = {
|
||||
token: string;
|
||||
};
|
||||
|
||||
export const getResetTokenValidity = async ({ token }: GetResetTokenValidityOptions) => {
|
||||
const found = await prisma.passwordResetToken.findFirst({
|
||||
select: {
|
||||
id: true,
|
||||
},
|
||||
where: {
|
||||
token,
|
||||
},
|
||||
});
|
||||
|
||||
return !!found;
|
||||
};
|
||||
Reference in New Issue
Block a user