MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / jsonResponse

Function jsonResponse

apps/host-selfhost/src/mcp/index.ts:71–75  ·  view source on GitHub ↗
(value: unknown, status: number)

Source from the content-addressed store, hash-verified

69}
70
71const jsonResponse = (value: unknown, status: number): Response =>
72 new Response(JSON.stringify(value), {
73 status,
74 headers: { "content-type": "application/json" },
75 });
76
77const parseRoles = (role: string | null | undefined): ReadonlyArray<string> =>
78 (role ?? "user")

Callers 1

makeApprovalHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected