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

Function getTrpcInput

apps/api/src/hooks/request-logging.hook.ts:7–16  ·  view source on GitHub ↗
(
  request: FastifyRequest
)

Source from the content-addressed store, hash-verified

5const ignoreMethods = ['OPTIONS'];
6
7const getTrpcInput = (
8 request: FastifyRequest
9): Record<string, unknown> | undefined => {
10 const input = path<any>(['query', 'input'], request);
11 try {
12 return typeof input === 'string' ? JSON.parse(input).json : input;
13 } catch {
14 return undefined;
15 }
16};
17
18export async function requestLoggingHook(
19 request: FastifyRequest,

Callers 1

requestLoggingHookFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected