From 88cd508b9b19c32c375b9bbf6812e14ff25b1c05 Mon Sep 17 00:00:00 2001 From: brad Date: Tue, 6 Jul 2021 13:47:16 +0200 Subject: [PATCH] Refactor method for matching OHM-1078 --- src/middleware/requestMatching.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/requestMatching.js b/src/middleware/requestMatching.js index 3808a7db..57738ba7 100644 --- a/src/middleware/requestMatching.js +++ b/src/middleware/requestMatching.js @@ -26,7 +26,7 @@ function matchContent (channel, ctx) { } function matchMethod(channel, ctx) { - return channel.methods.find(method => ctx.request.method.toUpperCase() === method) ? true : false + return !!channel.methods.find(method => ctx.request.method.toUpperCase() === method) } function matchRegex (regexPat, body) {