diff --git a/src/apps/private/lib/context/index.js b/src/apps/private/lib/context/index.js index f23e23c..b6800ec 100644 --- a/src/apps/private/lib/context/index.js +++ b/src/apps/private/lib/context/index.js @@ -9,7 +9,7 @@ async function middleware( req, res, next ){ } const userID = req.JWT.payload.sub; req.context = { - user : await usersModel.findById( userID , { password : 0 , session_token : 0 , session_token_exp : 0 } ) + user : await usersModel.findById( userID , { password : 0 , session_token : 0 , session_token_exp : 0 } ).populate('company') } req.context.userId = req.context.user.id; req.context.companyId = req.context.user.company || null;