Skip to content

Commit 49cb6a0

Browse files
committed
upgrading to find-my-way router 5.x
1 parent 78530a9 commit 49cb6a0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = function (routerOpts = {}, routerFactory = require('find-my-way
2525
.map(endpoint => typeof endpoint === 'string' ? { url: endpoint } : endpoint)
2626
.forEach(({ methods = ['GET'], url, version, updateParams = false }) => {
2727
if (version) {
28-
router.on(methods, url, { version }, handlers.match(updateParams))
28+
router.on(methods, url, { constraints: { version } }, handlers.match(updateParams))
2929
} else {
3030
router.on(methods, url, handlers.match(updateParams))
3131
}

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
},
2929
"homepage": "https://github.com/jkyberneees/middleware-if-unless#readme",
3030
"devDependencies": {
31-
"chai": "^4.2.0",
32-
"express-unless": "^0.5.0",
33-
"mocha": "^8.2.1",
34-
"nyc": "^14.1.1",
35-
"restana": "^4.8.0",
36-
"supertest": "^6.0.1"
31+
"chai": "^4.3.6",
32+
"express-unless": "^1.0.0",
33+
"mocha": "^9.2.2",
34+
"nyc": "^15.1.0",
35+
"restana": "^4.9.4",
36+
"supertest": "^6.2.2"
3737
},
3838
"dependencies": {
39-
"find-my-way": "^3.0.5"
39+
"find-my-way": "^5.5.1"
4040
}
4141
}

0 commit comments

Comments
 (0)