Each config gets called with:
var mod = require(conf.directory);
if ( conf.crud ) {
methodMixins(mod, conf);
}
app.use(mount('/api/v1', Resource(conf.name, mod).middleware()));
conf.name
ends up being paymentMethods
methodMixins
are just the default crud ops for koa resource routers default middleware keys.
I make a call to GET /api/v1/payment-methods/exampleid
and it doesn't call my middleware, instead returns 404, cannot get that route.
Any other calls, ex. PUT /api/v1/payment-methods/exampleid
, POST /api/v1/payment-methods
, work. -_-