Skip to content

Commit

Permalink
fix: fix routes with array of method
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenboox authored and SkeLLLa committed Feb 7, 2023
1 parent 303c155 commit 07ab256
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fastify-metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export class FastifyMetrics implements IFastifyMetrics {
if (
this.routesWhitelist.has(
FastifyMetrics.getRouteSlug({
method: request.routerMethod,
method: request.method,
url: request.routerPath,
})
)
Expand All @@ -324,7 +324,7 @@ export class FastifyMetrics implements IFastifyMetrics {
request.routeConfig.statsId ??
request.routerPath ??
this.routeFallback;
const method = request.routerMethod ?? request.method;
const method = request.method;

const labels = {
[this.routeMetrics.labelNames.method]: method,
Expand Down

0 comments on commit 07ab256

Please sign in to comment.