(
request: FastifyRequest,
reply: FastifyReply,
...rest: MaybeOptionalOptions<FriendlyStandardHandleOptions<T>>
)
| 32 | } |
| 33 | |
| 34 | async handle( |
| 35 | request: FastifyRequest, |
| 36 | reply: FastifyReply, |
| 37 | ...rest: MaybeOptionalOptions<FriendlyStandardHandleOptions<T>> |
| 38 | ): Promise<FastifyHandleResult> { |
| 39 | return intercept( |
| 40 | this.adapterInterceptors, |
| 41 | { |
| 42 | ...resolveFriendlyStandardHandleOptions(resolveMaybeOptionalOptions(rest)), |
| 43 | request, |
| 44 | reply, |
| 45 | sendStandardResponseOptions: this.sendStandardResponseOptions, |
| 46 | }, |
| 47 | async ({ request, reply, sendStandardResponseOptions, ...options }) => { |
| 48 | const standardRequest = toStandardLazyRequest(request, reply) |
| 49 | |
| 50 | const result = await this.standardHandler.handle(standardRequest, options) |
| 51 | |
| 52 | if (!result.matched) { |
| 53 | return { matched: false } |
| 54 | } |
| 55 | |
| 56 | await sendStandardResponse(reply, result.response, sendStandardResponseOptions) |
| 57 | |
| 58 | return { matched: true } |
| 59 | }, |
| 60 | ) |
| 61 | } |
| 62 | } |
no test coverage detected