CartoDB-SQL-API/app/middlewares/user.js

11 lines
269 B
JavaScript
Raw Normal View History

const CdbRequest = require('../models/cartodb_request');
2016-10-04 21:19:31 +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
};