Closed chrishale closed 3 years ago
Apologies, I should have spent more time testing this. I've made another revision
Thanks @chrishale. This has prompted something else that I should really address, which is that this endpoint doesn't allow anonymous requests so you need to be logged into the CMS to actually use it (which is no good as you might be requesting it from your app). I'll not merge in this PR–as I will fix this along with fixing the authentication concern, too.
I'm finding when fetching the headless endpoint at
/actions/craftagram/default/api
my JSON parse fails.Perhaps because I'm in development mode, but I'm seeing the following error returned alongside the JSON:
Looking at the DefaultController, I think this to be because there is no
return
ordie()
in the API action. So it goes on to look for a template to render.