MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / ok

Function ok

src/ui-server/api/respond.ts:63–66  ·  view source on GitHub ↗
(res: ServerResponse, payload: unknown, method: string)

Source from the content-addressed store, hash-verified

61
62/** Send a successful payload. */
63export function ok(res: ServerResponse, payload: unknown, method: string): true {
64 sendJson(res, 200, payload, method);
65 return true;
66}
67
68/** Send a failure. Anything that is not an {@link ApiError} becomes a 500. */
69export function fail(res: ServerResponse, err: unknown, method: string): true {

Callers 3

handlerFunction · 0.90
dispatchWriteFunction · 0.90
dispatchPathRoutesFunction · 0.90

Calls 1

sendJsonFunction · 0.90

Tested by

no test coverage detected