Skip to content

Commit

Permalink
Fix default routes
Browse files Browse the repository at this point in the history
  • Loading branch information
revskill10 committed Dec 1, 2018
1 parent 2431e08 commit c50a377
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const url = require('url')
function _defaultRoutes(additionRoutes) {
return {
...additionRoutes,
'/*': function({handle, req, res, parsedUrl}) {
handle(req, res, parsedUrl)
'*': function({handle, req, res}) {
handle(req, res)
},
}
}
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-routes-middleware",
"version": "1.0.4",
"version": "1.0.6",
"description": "Express middleware for Next.js dynamic routes",
"main": "index.js",
"scripts": {
Expand All @@ -9,8 +9,12 @@
"author": "Truong Hoang Dung (@revskill10)",
"license": "MIT",
"dependencies": {
"mobile-detect": "^1.4.3",
"path-match": "^1.2.4",
"path-to-regexp": "^2.4.0"
"mobile-detect": "1.4.3",
"path-match": "1.2.4",
"path-to-regexp": "2.4.0"
},
"repository": {
"type": "git",
"url": "https://github.com/revskill10/next-template.git"
}
}

0 comments on commit c50a377

Please sign in to comment.