diff --git a/lib/util/format-param-url.js b/lib/util/format-param-url.js index 7d8b029a..d5ce7d52 100644 --- a/lib/util/format-param-url.js +++ b/lib/util/format-param-url.js @@ -65,9 +65,9 @@ function formatParamUrl (str) { state = 'regexp' level++ } else if (char === '*') { - // * -> wildcard + // * -> {*} // should be exist once only - path += '{wildcard}' + path += '{*}' } else { path += char } diff --git a/test/util.js b/test/util.js index 345002e5..d0a62fb8 100644 --- a/test/util.js +++ b/test/util.js @@ -10,7 +10,7 @@ const cases = [ ['/example/:userId/:secretToken', '/example/{userId}/{secretToken}'], ['/example/near/:lat-:lng/radius/:r', '/example/near/{lat}-{lng}/radius/{r}'], ['/example/near/:lat_1-:lng_1/radius/:r_1', '/example/near/{lat_1}-{lng_1}/radius/{r_1}'], - ['/example/*', '/example/{wildcard}'], + ['/example/*', '/example/{*}'], ['/example/:file(^\\d+).png', '/example/{file}.png'], ['/example/at/:hour(^\\d{2})h:minute(^\\d{2})m', '/example/at/{hour}h{minute}m'], ['/example/at/(^\\d{2})h(^\\d{2})m', '/example/at/{regexp1}h{regexp2}m'],