-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Domain Management: Email: Select site redirects to manage domains #3324
Conversation
Seeing the following error when I go to
|
@breezyskies You're right, there was a slightly weird ES6 issue there. Should be fixed now. (Requires a full restart of the server) |
Working for me now. 👍 I'll leave the code review to @klimeryk. :) |
module.exports = function() { | ||
SiftScience.recordUser(); | ||
function registerMultiPage( { routes, handlers } ) { | ||
routes.forEach( path => page( path, ...handlers ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be the lovely fewer I'm experiencing right now, but it took me a second to realize that path
comes from iterating routes
. I think it'd be better to keep the naming more uniform - iterating routes
gives you a route
, not a path
. Or better yet go paths
-> path
, because that's usually how it's referenced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Other than keeping the naming uniform, everything looks good. Actually, it looks great - awesome refactor! 👍 |
3214dd1
to
a662efb
Compare
@klimeryk or @stephanethomas I've renamed it to |
LGTM 🚢 |
Domain Management: Email: Select site redirects to manage domains
Nice, much simpler. Glad it worked well. |
This PR fixes #855: If you go to
/domains/manage/email
it will not redirect you to/domains/manage
but will show all sites under/domains/manage/email
, so that once you select a site, you will land on the email page.I also did some refactoring for the routes to reduce duplicate code.
/cc: @klimeryk for review
/cc2: @breezyskies for reporting the original issue and @mtias since he suggested the solution