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

Do you think Blueprints in sails should be deactivated? #96

Closed
lennyAiko opened this issue Mar 30, 2024 · 6 comments
Closed

Do you think Blueprints in sails should be deactivated? #96

lennyAiko opened this issue Mar 30, 2024 · 6 comments

Comments

@lennyAiko
Copy link
Contributor

lennyAiko commented Mar 30, 2024

Description

I noticed that in the boring-stack, the sails blueprint API is activated, and it works. Though it fetches the data of the page as HTML, not JSON.

I want to be sure if the blueprints API in any way aids inertia, or if it poses no flaw.
I am also pointing it out because the page I am able to fetch with the blueprints API is an authenticated page.

Current behavior

When I run localhost:1337/api/articles, I get my response as JSON on Postman. (can be accessed, not authenticated route)

However, when I run localhost:1337/articles I get my response as HTML on Postman. (should not be access, authenticated route)

Expected behavior

If it is possible for localhost:1337/articles to not be accessible since it is a page, it might be authenticated.

Feel free to ask more questions. @DominusKelvin
...

Replace space in square bracket with x e.g [x]

[x] I have checked and this issue does not exist

@DominusKelvin
Copy link
Member

Yeah I don't use blueprints most of the time so I basically just turn it off. It's not a flaw but don't have much value when you are building a full-stack app @lennyAiko

@lennyAiko
Copy link
Contributor Author

Alright noted. Thanks @DominusKelvin

Could it be turned off from the template? Just in case it does not come to thought for other users of the boring-stack.

@DominusKelvin
Copy link
Member

@lennyAiko I think so, you can submit a PR to that effect for all 3 templates

@lennyAiko
Copy link
Contributor Author

Thanks @DominusKelvin I will submit that PR!

@DominusKelvin
Copy link
Member

Hey @lennyAiko, I've merged the PR to fix this so perhaps we can close it now?

@DominusKelvin
Copy link
Member

I'm going ahead to close this issue as @lennyAiko's #101 PR resolves it.

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

No branches or pull requests

2 participants