chore: remove share button from top level, texts (#653)

This commit is contained in:
Timur Ercan
2023-11-16 06:43:50 +01:00
committed by GitHub
parent 8722e4de74
commit e838a07bf9
8 changed files with 121 additions and 83 deletions

View File

@ -13,20 +13,6 @@ export const getRecipientOrSenderByShareLinkSlug = async ({
},
});
const recipient = await prisma.recipient.findFirst({
where: {
documentId,
email,
},
include: {
Signature: true,
},
});
if (recipient) {
return recipient;
}
const sender = await prisma.user.findFirst({
where: {
Document: { some: { id: documentId } },
@ -43,5 +29,19 @@ export const getRecipientOrSenderByShareLinkSlug = async ({
return sender;
}
const recipient = await prisma.recipient.findFirst({
where: {
documentId,
email,
},
include: {
Signature: true,
},
});
if (recipient) {
return recipient;
}
throw new Error('Recipient or sender not found');
};