MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / json

Function json

src/cli/dashboard-server.ts:29–29  ·  view source on GitHub ↗
(status: number, obj: any)

Source from the content-addressed store, hash-verified

27 },
28): Promise<RouteResult> {
29 const json = (status: number, obj: any): RouteResult => ({ status, body: JSON.stringify(obj), contentType: 'application/json' });
30 if (!opts.tokenOk) return json(401, { ok: false, message: 'Unauthorized — missing or bad token.' });
31
32 if (opts.method === 'GET' && (opts.pathname === '/' || opts.pathname === '')) {

Callers 1

handleRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected