strapi
strapi copied to clipboard
Retrieve single type data
Hello, i using @nuxtjs/strapi v0.3.6 for my Nuxt v2.15.7 application. I created single type named "configuration", but cannot retrieve it from @nuxtjs/strapi module ($strapi.find('configuration')) So, question is: Is single type data supported by @nuxtjs/strapi module? I cannot find any information about this in the documentation
i didn't find any information on this either. But it works for me.
Create the single type entry. check find method in public role in strapi settings. try to fetch (testing with localhost:1337/configuration or localhost:1337/api/configuration for strapi v4.
Hello @de-soul @sebastianjung . You can add in blank quotes using findOne():
const { data: page } = await findOne<Start>("homepage", ""});
This is something that definitely needs to be addressed either in code or in the docs.
@de-soul @sebastianjung As of 1.7.1 you can do this without empty quotes as well.