Files
documenso/packages/lib/server-only/comment/find-comments.ts
2024-01-11 11:53:52 +02:00

26 lines
433 B
TypeScript

import { prisma } from '@documenso/prisma';
export const findComments = async () => {
return await prisma.documentComment.findMany({
where: {
parentId: null,
},
include: {
User: {
select: {
name: true,
},
},
replies: {
include: {
User: {
select: {
name: true,
},
},
},
},
},
});
};