mirror of
https://github.com/hanzoai/sign.git
synced 2026-11-02 23:26:15 +00:00
The product is branded Hanzo eSign (esign.hanzo.ai, repo hanzoai/esign). Rename all workspace packages @hanzo/sign-* → @hanzo/esign-* (1052 files) and align docker/Dockerfile turbo --scope/--filter to the actual remix package name @hanzo/esign (was a pre-existing mismatch with -remix that broke the build). Protected deps (@hanzo/insights, @hanzo/logo) untouched.
22 lines
537 B
TypeScript
22 lines
537 B
TypeScript
import { prisma } from '@hanzo/esign-prisma';
|
|
|
|
import { USER_SIGNUP_VERIFICATION_TOKEN_IDENTIFIER } from '../../constants/email';
|
|
|
|
export type getMostRecentEmailVerificationTokenOptions = {
|
|
userId: number;
|
|
};
|
|
|
|
export const getMostRecentEmailVerificationToken = async ({
|
|
userId,
|
|
}: getMostRecentEmailVerificationTokenOptions) => {
|
|
return await prisma.verificationToken.findFirst({
|
|
where: {
|
|
userId,
|
|
identifier: USER_SIGNUP_VERIFICATION_TOKEN_IDENTIFIER,
|
|
},
|
|
orderBy: {
|
|
createdAt: 'desc',
|
|
},
|
|
});
|
|
};
|