( request: FastifyRequest )
| 5 | const ignoreMethods = ['OPTIONS']; |
| 6 | |
| 7 | const 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 | |
| 18 | export async function requestLoggingHook( |
| 19 | request: FastifyRequest, |
no test coverage detected