Files
sign/packages/lib/server-only/field/get-fields-for-token.ts

19 lines
345 B
TypeScript
Raw Normal View History

2023-08-17 19:56:18 +10:00
import { prisma } from '@documenso/prisma';
export type GetFieldsForTokenOptions = {
token: string;
};
export const getFieldsForToken = async ({ token }: GetFieldsForTokenOptions) => {
return await prisma.field.findMany({
where: {
2025-01-13 13:41:53 +11:00
recipient: {
2023-08-17 19:56:18 +10:00
token,
},
},
include: {
2025-01-13 13:41:53 +11:00
signature: true,
2023-08-17 19:56:18 +10:00
},
});
};