Is this middleware applied to all actions?
Unique name for the middleware.
Called after the action runs.
Called before the action runs. Has access to all params, before sanitization. Can modify the data object for use in actions.
Module load order. Defaults to api.config.general.defaultMiddlewarePriority.
Generated using TypeDoc
var middleware = { name: 'userId checker', global: false, priority: 1000, preProcessor: async (data) => { if(!data.params.userId){ throw new Error('All actions require a userId') } }, postProcessor: async (data) => { if(data.thing.stuff == false){ data.toRender = false } } }