Files
sign/packages/lib/server-only/recipient/get-recipient-by-token.ts

17 lines
332 B
TypeScript
Raw Normal View History

2023-08-17 19:56:18 +10:00
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,
},
2023-08-17 19:56:18 +10:00
});
};