2018-02-17 01:21:06 +08:00
|
|
|
const CdbRequest = require('../models/cartodb_request');
|
2016-10-04 21:19:31 +08:00
|
|
|
|
2018-02-17 01:21:06 +08:00
|
|
|
module.exports = function user () {
|
|
|
|
const cdbRequest = new CdbRequest();
|
|
|
|
|
|
|
|
return function userMiddleware (req, res, next) {
|
|
|
|
res.locals.user = cdbRequest.userByReq(req);
|
|
|
|
next();
|
|
|
|
};
|
2016-10-04 21:19:31 +08:00
|
|
|
};
|