MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getProject

Function getProject

apps/api/src/controllers/manage.controller.ts:75–91  ·  view source on GitHub ↗
(
  request: FastifyRequest<{ Params: { id: string } }>,
  reply: FastifyReply
)

Source from the content-addressed store, hash-verified

73}
74
75export async function getProject(
76 request: FastifyRequest<{ Params: { id: string } }>,
77 reply: FastifyReply
78) {
79 const project = await db.project.findFirst({
80 where: {
81 id: request.params.id,
82 organizationId: request.client!.organizationId,
83 },
84 });
85
86 if (!project) {
87 throw new HttpError('Project not found', { status: 404 });
88 }
89
90 reply.send({ data: project });
91}
92
93export async function createProject(
94 request: FastifyRequest<{ Body: z.infer<typeof zCreateProject> }>,

Callers

nothing calls this directly

Calls 1

sendMethod · 0.45

Tested by

no test coverage detected