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 tx.document.findFirstOrThrow({
where: {
id: documentId,
...(teamId
? {
team: {
id: teamId,
members: {
some: {
userId,
},
const document = await prisma.document.findFirstOrThrow({
where: {
id: documentId,
...(teamId
? {
team: {
id: teamId,
members: {
some: {
userId,
},
},
}
: {
userId,
teamId: null,
}),
},
});
},
}
: {
userId,
teamId: null,
}),
},
});
if (document.title === title) {
return document;