I had the same experience with docs etc about this — I resorted to looking at the source to figure out the correct interceptors for what I want.
I'm loving the power and flexibility of Pedestal, despite the friction of the incomplete and sometimes inaccurate docs.
in particular, I'm delighted with how I can use all of the interceptor machinery in some code intended to handle actions taken in a turn-based game.
@orestis, yeah the docs are a lagging and a constant wip. Please create issues in the https://github.com/pedestal/pedestal-docs repo whenever you encounter incorrect information! It’s greatly appreciated 🙂
using a "router" that matches action keywords to their interceptor chains. that lets me write interceptors that eg. check it's your turn, or that a move is legal before enacting it.
and unlike in most languages, where this kind of thing is a "pattern" I have to reimplement, it's just code I can reuse.
Oh, I didn’t realize it’s a separate repo. I’ll have a look once I’m back in that area of my app.
np, thanks!
I'm struggling with reloading the server. sometimes it seems to get wedged, and even though I'm doing a reload-all of my top-level server, and then restarting it, I'm getting the old set of routes and interceptors.
@braden.shepherdson you may want to give pedestal.service-tools watch
a spin. (https://github.com/pedestal/pedestal/blob/master/service-tools/src/io/pedestal/service_tools/dev.clj#L23-L36)
couple that with run-dev and you should see your route changes take effect