Files
documenso/packages/lib/server-only/recipient/get-recipient-by-token.ts
2025-03-17 14:20:41 +11:00

17 lines
332 B
TypeScript

import { prisma } from '@documenso/prisma';
export interface GetRecipientByTokenOptions {
token: string;
}
export const getRecipientByToken = async ({ token }: GetRecipientByTokenOptions) => {
return await prisma.recipient.findFirstOrThrow({
where: {
token,
},
include: {
fields: true,
},
});
};