js/controller.js
function ActionMiddleware(...middleware) {
    return function (target, propertyKey, descriptor) {
        if (middleware != undefined) {
            let m = exports.globalKCState.getOrInsertController(target.constructor).getOrInsertMethod(propertyKey);
            m.middleware = middleware.concat(m.middleware);
        }
    };
}
function ActionMiddleware(...middleware) {
    return function (target, propertyKey, descriptor) {
        if (middleware != undefined) {
            let m = exports.globalKCState.getOrInsertController(target.constructor).getOrInsertMethod(propertyKey);
            m.middleware = middleware.concat(m.middleware);
        }
    };
}
function ActionMiddleware ( ... middleware ) { return function ( target , propertyKey , descriptor ) { if ( middleware != undefined ) { let m = exports . globalKCState . getOrInsertController ( target . constructor ) . getOrInsertMethod ( propertyKey ) ; m . middleware = middleware . concat ( m . middleware ) ; } } ; }
Adds express middleware to run before the method
@param { Express.RequestHandler[] } middleware - Array of middleware to add.
Adds express middleware to run before the method