fix: store operator id for each service

This commit is contained in:
José Oliveira 2021-06-16 11:40:14 +01:00
parent 9b28c6a3f1
commit 8884c75ffd
4 changed files with 14 additions and 9 deletions

View file

@ -1,7 +1,7 @@
const { getOperatorId } = require('../operator')
function findOperatorId (req, res, next) {
return getOperatorId()
return getOperatorId('middleware')
.then(({ id }) => {
res.locals.operatorId = id
return next()