Reputation: 571
I was taking a look at this the docs on the admin api and realized that it perfectly solves my case of using Keystone to power a SPA. However, I can't figure out a way to access the admin api routes from the api routes that I'm building without forcing an auth event first.
Anyone have suggestions for how I could accomplish this?
Upvotes: 3
Views: 253
Reputation: 571
After a bit of trial and error I came to a solution that I'm pretty happy with. I took a good look at keystone/admin/server/app/createDynamicRouter.js and copied the functionality from there, and also duplicated keystone/admin/server/middleware/initList.js.
Upvotes: 3