alekzonder/maf

View on GitHub
src/Rest/Middleware/ContextUser.js

Summary

Maintainability
A
0 mins
Test Coverage
var ContextUser = require('../Context/User');

module.exports = () => {

    return {

        position: 'afterSchemaCheck',

        middleware: (req, res, next) => {
            req.user = new ContextUser();
            next();
        }
    };
};