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,
|
|
|
|
|
},
|
2025-02-01 03:31:18 +00:00
|
|
|
include: {
|
|
|
|
|
fields: true,
|
|
|
|
|
},
|
2023-08-17 19:56:18 +10:00
|
|
|
});
|
|
|
|
|
};
|