mirror of
https://github.com/documenso/documenso
synced 2026-04-21 21:37:18 +00:00
Introduces the ability for users with the **Assistant** role to prefill fields on behalf of other signers. Assistants can fill in various field types such as text, checkboxes, dates, and more, streamlining the document preparation process before it reaches the final signers.
16 lines
332 B
TypeScript
16 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,
|
|
},
|
|
});
|
|
};
|