mirror of
https://github.com/documenso/documenso.git
synced 2025-11-17 02:01:33 +10:00
chore: changes based on review
This commit is contained in:
@ -31,7 +31,7 @@ export const selfSignDocument = async ({
|
||||
},
|
||||
});
|
||||
|
||||
const document = await prisma.document.findUnique({
|
||||
const document = await prisma.document.findFirstOrThrow({
|
||||
where: {
|
||||
id: documentId,
|
||||
userId,
|
||||
@ -64,7 +64,7 @@ export const selfSignDocument = async ({
|
||||
|
||||
const { documentData } = document;
|
||||
|
||||
if (!documentData.data) {
|
||||
if (!documentData || !documentData.data) {
|
||||
throw new Error('Document data not found');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user