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

Function getClient

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

Source from the content-addressed store, hash-verified

274}
275
276export async function getClient(
277 request: FastifyRequest<{ Params: { id: string } }>,
278 reply: FastifyReply
279) {
280 const client = await db.client.findFirst({
281 where: {
282 id: request.params.id,
283 organizationId: request.client!.organizationId,
284 },
285 });
286
287 if (!client) {
288 throw new HttpError('Client not found', { status: 404 });
289 }
290
291 reply.send({ data: client });
292}
293
294export async function createClient(
295 request: FastifyRequest<{ Body: z.infer<typeof zCreateClient> }>,

Callers

nothing calls this directly

Calls 1

sendMethod · 0.45

Tested by

no test coverage detected