MCPcopy Index your code
hub / github.com/coder/mux / jsonResponse

Function jsonResponse

src/node/services/serverAuthService.test.ts:8–15  ·  view source on GitHub ↗
(body: Record<string, unknown>, status = 200)

Source from the content-addressed store, hash-verified

6import { ServerAuthService, SERVER_AUTH_SESSION_MAX_AGE_SECONDS } from "./serverAuthService";
7
8function jsonResponse(body: Record<string, unknown>, status = 200): Response {
9 return new Response(JSON.stringify(body), {
10 status,
11 headers: {
12 "Content-Type": "application/json",
13 },
14 });
15}
16
17function mockFetch(
18 fn: (input: string | URL, init?: RequestInit) => Response | Promise<Response>

Calls

no outgoing calls

Tested by

no test coverage detected