log user
This commit is contained in:
parent
49735308de
commit
578f543c01
@ -6,8 +6,10 @@ module.exports = function user (metadataBackend) {
|
|||||||
const cdbRequest = new CdbRequest();
|
const cdbRequest = new CdbRequest();
|
||||||
|
|
||||||
return function userMiddleware (req, res, next) {
|
return function userMiddleware (req, res, next) {
|
||||||
|
const { logger } = res.locals;
|
||||||
try {
|
try {
|
||||||
res.locals.user = getUserNameFromRequest(req, cdbRequest);
|
res.locals.user = getUserNameFromRequest(req, cdbRequest);
|
||||||
|
logger.info({ user: res.locals.user });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return next(err);
|
return next(err);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user