Windshaft-cartodb/lib/cartodb/api/middlewares/user.js
2018-04-09 16:18:30 +02:00

12 lines
268 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();
};
};