Skip to content

Commit

Permalink
feat: endpoint("/") defaults method to "GET"
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Nov 26, 2018
1 parent a93415d commit 31cec12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const lowercaseKeys = require('./util/lowercase-keys')

function defaultOptions (defaults, route, options) {
if (typeof route === 'string') {
const [method, url] = route.split(' ')
options = Object.assign({ method, url }, options)
let [method, url] = route.split(' ')
options = Object.assign(url ? { method, url } : { url: method }, options)
} else {
options = route || {}
}
Expand Down

0 comments on commit 31cec12

Please sign in to comment.