mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 08:42:12 +10:00
chore: refactor
This commit is contained in:
@ -136,7 +136,7 @@ export const EditDocumentForm = ({
|
||||
|
||||
toast({
|
||||
title: 'Error',
|
||||
description: 'An error occurred while updating the general settings.',
|
||||
description: 'An error occurred while updating the document settings.',
|
||||
variant: 'destructive',
|
||||
});
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ type IsRecipientAuthorizedOptions = {
|
||||
authOptions?: TDocumentAuthMethods;
|
||||
};
|
||||
|
||||
const getRecipient = async (email: string) => {
|
||||
const getUserByEmail = async (email: string) => {
|
||||
return await prisma.user.findFirst({
|
||||
where: {
|
||||
email,
|
||||
@ -74,7 +74,7 @@ export const isRecipientAuthorized = async ({
|
||||
return false;
|
||||
}
|
||||
|
||||
const recipientUser = await getRecipient(recipient.email);
|
||||
const recipientUser = await getUserByEmail(recipient.email);
|
||||
|
||||
if (!recipientUser) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user