Skip to content

Commit 2c2f385

Browse files
committed
fix(fastify): adds the non-standard http methods to the instance
1 parent fc54154 commit 2c2f385

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/platform-fastify/adapters/fastify-adapter.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,10 @@ export class FastifyAdapter<
760760
handler: handlerRef,
761761
};
762762

763+
if (this.instance.supportedMethods.indexOf(routerMethodKey) > -1) {
764+
this.instance.addHttpMethod(routerMethodKey, { hasBody: true });
765+
}
766+
763767
if (isVersioned || hasConstraints || hasConfig) {
764768
const isPathAndRouteTuple = args.length === 2;
765769
if (isPathAndRouteTuple) {

0 commit comments

Comments
 (0)