By Chris Sev
Sr Developer Advocate
We create an API that has authentication and authorization so that certain resources are only accessible by certain users.
DigitalOcean users that want to protect certain parts of their API.
A little understanding of how APIs work.
Chris Sev is the founder of scotch.io and Senior Developer Advocate at DigitalOcean. He loves trying to figure out the most efficient and practical way to build apps that we can ship to our customers.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in our Questions & Answers section, find tutorials and tools that will help you grow as a developer and scale your project or business, and subscribe to topics of interest.Sign up now
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Question about overriding the
If I don’t override anything, by default hitting the
localhost:1337/postsurl returns an array of all the posts.
If I add an
aync find()function into the controller (I’m adding url query param to also filter posts by specific user), and even just do a
strapi.query('post').find(), the result is now an object with keys rather than an array?
Does it not use
strapi.query('post').find()by default, and if it does, how come manually telling it to use
strapi.query('post').find()doesn’t return the results as an array?