Windshaft-cartodb/lib/cartodb/middleware/user.js

9 lines
211 B
JavaScript

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