Function
listProjects
(
request: FastifyRequest,
reply: FastifyReply
)
Source from the content-addressed store, hash-verified
| 56 | |
| 57 | // Projects CRUD |
| 58 | export async function listProjects( |
| 59 | request: FastifyRequest, |
| 60 | reply: FastifyReply |
| 61 | ) { |
| 62 | const projects = await db.project.findMany({ |
| 63 | where: { |
| 64 | organizationId: request.client!.organizationId, |
| 65 | deleteAt: null, |
| 66 | }, |
| 67 | orderBy: { |
| 68 | createdAt: 'desc', |
| 69 | }, |
| 70 | }); |
| 71 | |
| 72 | reply.send({ data: projects }); |
| 73 | } |
| 74 | |
| 75 | export async function getProject( |
| 76 | request: FastifyRequest<{ Params: { id: string } }>, |
Callers
nothing calls this directly
Tested by
no test coverage detected