fix: build errors from merge

This commit is contained in:
Mythie
2024-02-26 09:13:46 +11:00
parent 2a74ce06ef
commit 4cb0d6999d

View File

@ -26,27 +26,26 @@ export const updateTitle = async ({
}, },
}); });
return await prisma.$transaction(async (tx) => { const document = await prisma.document.findFirstOrThrow({
const document = await tx.document.findFirstOrThrow({ where: {
where: { id: documentId,
id: documentId, ...(teamId
...(teamId ? {
? { team: {
team: { id: teamId,
id: teamId, members: {
members: { some: {
some: { userId,
userId,
},
}, },
}, },
} },
: { }
userId, : {
teamId: null, userId,
}), teamId: null,
}, }),
}); },
});
if (document.title === title) { if (document.title === title) {
return document; return document;