Skip to content

Conversation

@gsabran
Copy link

@gsabran gsabran commented Jun 1, 2016

Currently, doing:

Picker.route('somePath', (params, req, res, next) => {
  if (req.method == 'POST') {
     ...
  } else { next(); }
});
Picker.route('somePath', (params, req, res, next) => {
  if (req.method == 'GET') {
     ...
  } else { next(); }
});

will not reach the GET route if the request is GET somePath.
For any other example where several route definitions match the current path, calling next will not go to the next definition.

If you accept the PR, it's be good to update picker's version and the dependency in flow-router-ssr at https://github.com/kadirahq/flow-router/blob/ssr/package.js#L61

Currently, doing:

```javascript
Picker.route('somePath', (params, req, res, next) => {
  if (req.method == 'POST') {
     ...
  } else { next(); }
});
Picker.route('somePath', (params, req, res, next) => {
  if (req.method == 'GET') {
     ...
  } else { next(); }
});
```

will not reach the GET route if the request is `GET somePath`. If you accept the PR, it's be good to update picker's version and the dependency in flow-router-ssr at https://github.com/kadirahq/flow-router/blob/ssr/package.js#L61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant