Skip to content

Commit

Permalink
Refactor method for matching
Browse files Browse the repository at this point in the history
OHM-1078
  • Loading branch information
bradsawadye committed Jul 6, 2021
1 parent a6001d7 commit 88cd508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware/requestMatching.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 88cd508

Please sign in to comment.