diff --git a/packages/component-user-manager/src/routes/fragmentsUsers/emails/notifications.js b/packages/component-user-manager/src/routes/fragmentsUsers/emails/notifications.js index 9a9281fa22b59b1e76db7dcb8cc8ee00b6170641..f436f0f3d76697ef8d53338fbc53a3b38ef5ff86 100644 --- a/packages/component-user-manager/src/routes/fragmentsUsers/emails/notifications.js +++ b/packages/component-user-manager/src/routes/fragmentsUsers/emails/notifications.js @@ -17,9 +17,9 @@ module.exports = { user, baseUrl, fragment, + reqUserId, UserModel, collection, - reqUser, }) { const fragmentHelper = new Fragment({ fragment }) const { title } = await fragmentHelper.getFragmentData({ @@ -55,7 +55,7 @@ module.exports = { }) } - const requestUser = await UserModel.find(reqUser) + const requestUser = await UserModel.find(reqUserId) if (requestUser.id !== user.id) { sendAddedToManuscriptEmail({ email, diff --git a/packages/component-user-manager/src/routes/fragmentsUsers/post.js b/packages/component-user-manager/src/routes/fragmentsUsers/post.js index fa0b2b2f352cd5a03988d3b537dd86b37cd87370..f4f0608f01eeaf8b849b636963197cd2a80a4495 100644 --- a/packages/component-user-manager/src/routes/fragmentsUsers/post.js +++ b/packages/component-user-manager/src/routes/fragmentsUsers/post.js @@ -97,7 +97,7 @@ module.exports = models => async (req, res) => { baseUrl, fragment, collection, - reqUser: req.user, + reqUserId: req.user, UserModel: models.User, }) @@ -136,6 +136,7 @@ module.exports = models => async (req, res) => { fragment, collection, user: newUser, + reqUserId: req.user, UserModel: models.User, })