mirror of
https://github.com/documenso/documenso.git
synced 2025-11-24 05:32:12 +10:00
feat: doc comments
This commit is contained in:
25
packages/lib/server-only/comment/find-comments.ts
Normal file
25
packages/lib/server-only/comment/find-comments.ts
Normal file
@ -0,0 +1,25 @@
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user