mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 01:01:49 +10:00
feat: migrate templates and documents to envelope model
This commit is contained in:
@ -7,7 +7,7 @@ export type GetRecipientOrSenderByShareLinkSlugOptions = {
|
||||
export const getRecipientOrSenderByShareLinkSlug = async ({
|
||||
slug,
|
||||
}: GetRecipientOrSenderByShareLinkSlugOptions) => {
|
||||
const { documentId, email } = await prisma.documentShareLink.findFirstOrThrow({
|
||||
const { envelopeId, email } = await prisma.documentShareLink.findFirstOrThrow({
|
||||
where: {
|
||||
slug,
|
||||
},
|
||||
@ -15,7 +15,7 @@ export const getRecipientOrSenderByShareLinkSlug = async ({
|
||||
|
||||
const sender = await prisma.user.findFirst({
|
||||
where: {
|
||||
documents: { some: { id: documentId } },
|
||||
envelopes: { some: { id: envelopeId } },
|
||||
email,
|
||||
},
|
||||
select: {
|
||||
@ -31,7 +31,7 @@ export const getRecipientOrSenderByShareLinkSlug = async ({
|
||||
|
||||
const recipient = await prisma.recipient.findFirst({
|
||||
where: {
|
||||
documentId,
|
||||
envelopeId,
|
||||
email,
|
||||
},
|
||||
select: {
|
||||
|
||||
Reference in New Issue
Block a user