Windshaft-cartodb/lib/cartodb/middleware/user.js
2018-03-12 11:52:38 +01:00

12 lines
265 B
JavaScript

const CdbRequest = require('../models/cdb_request');
module.exports = function user () {
const cdbRequest = new CdbRequest();
return function userMiddleware(req, res, next) {
res.locals.user = cdbRequest.userByReq(req);
next();
};
};