mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
19 lines
345 B
TypeScript
19 lines
345 B
TypeScript
import { prisma } from '@documenso/prisma';
|
|
|
|
export type GetFieldsForTokenOptions = {
|
|
token: string;
|
|
};
|
|
|
|
export const getFieldsForToken = async ({ token }: GetFieldsForTokenOptions) => {
|
|
return await prisma.field.findMany({
|
|
where: {
|
|
Recipient: {
|
|
token,
|
|
},
|
|
},
|
|
include: {
|
|
Signature: true,
|
|
},
|
|
});
|
|
};
|