Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Support multiple handlers for same paths #141

Merged
merged 3 commits into from
Nov 26, 2018
Merged

Conversation

offirgolan
Copy link
Collaborator

server.get('/ping').on('response', handler1);
server.get('/ping').on('request', handler2);

await fetch('/ping');

Given the above code sample, the expected behavior is that handler1 and handler2 would both be executed within the lifecycle of the request. The actual result was that only handler2 was getting executed because the router was overwriting the handler since the routes were the same.

@offirgolan offirgolan added bug 🐞 Something isn't working 📦 core labels Nov 26, 2018
@offirgolan offirgolan requested a review from jasonmit November 26, 2018 17:50
@jasonmit jasonmit merged commit 79e04b8 into master Nov 26, 2018
@jasonmit jasonmit deleted the route-matching branch November 26, 2018 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working 📦 core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants