Skip to content
Snippets Groups Projects
Commit d003b489 authored by Sebastian Mihalache's avatar Sebastian Mihalache
Browse files

fix(component-user-manager): add reqUserId to sendNotifications call

parent f1a943dc
No related branches found
No related tags found
1 merge request!43Sprint #19
...@@ -17,9 +17,9 @@ module.exports = { ...@@ -17,9 +17,9 @@ module.exports = {
user, user,
baseUrl, baseUrl,
fragment, fragment,
reqUserId,
UserModel, UserModel,
collection, collection,
reqUser,
}) { }) {
const fragmentHelper = new Fragment({ fragment }) const fragmentHelper = new Fragment({ fragment })
const { title } = await fragmentHelper.getFragmentData({ const { title } = await fragmentHelper.getFragmentData({
...@@ -55,7 +55,7 @@ module.exports = { ...@@ -55,7 +55,7 @@ module.exports = {
}) })
} }
const requestUser = await UserModel.find(reqUser) const requestUser = await UserModel.find(reqUserId)
if (requestUser.id !== user.id) { if (requestUser.id !== user.id) {
sendAddedToManuscriptEmail({ sendAddedToManuscriptEmail({
email, email,
......
...@@ -97,7 +97,7 @@ module.exports = models => async (req, res) => { ...@@ -97,7 +97,7 @@ module.exports = models => async (req, res) => {
baseUrl, baseUrl,
fragment, fragment,
collection, collection,
reqUser: req.user, reqUserId: req.user,
UserModel: models.User, UserModel: models.User,
}) })
...@@ -136,6 +136,7 @@ module.exports = models => async (req, res) => { ...@@ -136,6 +136,7 @@ module.exports = models => async (req, res) => {
fragment, fragment,
collection, collection,
user: newUser, user: newUser,
reqUserId: req.user,
UserModel: models.User, UserModel: models.User,
}) })
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment