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

Multi word with hyphen in API route as strapi entity #277

Open
maloua opened this issue Sep 1, 2022 · 0 comments
Open

Multi word with hyphen in API route as strapi entity #277

maloua opened this issue Sep 1, 2022 · 0 comments
Labels
question Further information is requested

Comments

@maloua
Copy link

maloua commented Sep 1, 2022

Wondering how to use a multi-word api route where there's a hyphen in the path

My case: I have a route called /press-releases, registered in nuxt.config.js under entities. I can't use this.$strapi.$press-releases in the application though, and didn't find a workaround to specify the URL path for an entity.

What's the right way to do this? If there's no way, it would be neat if snakeCasing did the trick.

Current setup:

# nuxt.config.js

strapi: {
    entities: [{ name: 'press-releases', type: 'collection' }],
    ...
}
# pages/press.vue

# JS can't handle this
this.$strapi.$press-releases.find() 
@maloua maloua added the question Further information is requested label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant