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

After enabling blueprint autorouting and the custom "prefix" setting, unexpected extra shadow route (sails.config.blueprints.actions + sails.config.blueprints.prefix) #4368

Open
bysouleater opened this issue Apr 20, 2018 · 1 comment
Labels
blueprints Issue only occurs when using the blueprint API bug helpful info or workaround

Comments

@bysouleater
Copy link

Sails version: 1.0.1
Node version: 9.11.1
NPM version: 5.6.0
DB adapter name: N/A
DB adapter version: N/A
Operating system: macOS High Sierra 10.13.4


Hi, I'm having an issue with the automatic routes generated by sails.

I have created a DocumentationController.js file inside api/controllers folder and added an action called index.
I have changed blueprints.js actions config to true.
When I lift the app, I can navigate http://localhost:1337/documentation and the method works correctly.

Now, when I add prefix: '/content' to blueprints.js file and lift the app again, I can navigate http://localhost:1337/documentation (works correctly) and http://localhost:1337/content/documentation (does not work), but http://localhost:1337/content/documentation/index does respond correctly.

Correct me if I'm wrong, but I believe this was not the intended functionality.

Thanks!

@sgress454
Copy link
Member

Thanks @bysouleater, we'll check this out!

@sgress454 sgress454 added the bug label Apr 24, 2018
@mikermcneil mikermcneil changed the title Default Controller action does not work automatic route when prefix After enabling blueprint autorouting and the custom "prefix" setting, unexpected extra shadow route (sails.config.blueprints.actions + sails.config.blueprints.prefix) Apr 26, 2018
@johnabrams7 johnabrams7 added blueprints Issue only occurs when using the blueprint API helpful info or workaround labels Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blueprints Issue only occurs when using the blueprint API bug helpful info or workaround
Development

No branches or pull requests

4 participants