chore: refactor

This commit is contained in:
David Nguyen
2024-03-21 22:02:09 +08:00
parent dc6aba58e6
commit 1375946bc5
2 changed files with 3 additions and 3 deletions

View File

@ -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',
});
}

View File

@ -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;