Skip to content

Commit d405dd4

Browse files
Merge pull request #14511 from johaven/fix-fastify-platfom-custom-methods
fix(fastify): adds the non-standard http methods to the instance
2 parents cc20288 + 0a86ba0 commit d405dd4

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
@@ -762,6 +762,10 @@ export class FastifyAdapter<
762762
handler: handlerRef,
763763
};
764764

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

0 commit comments

Comments
 (0)