mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
feat: document authoring
This commit is contained in:
13
packages/lib/server-only/recipient/get-recipient-by-token.ts
Normal file
13
packages/lib/server-only/recipient/get-recipient-by-token.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
export interface GetRecipientByTokenOptions {
|
||||
token: string;
|
||||
}
|
||||
|
||||
export const getRecipientByToken = async ({ token }: GetRecipientByTokenOptions) => {
|
||||
return await prisma.recipient.findFirstOrThrow({
|
||||
where: {
|
||||
token,
|
||||
},
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user