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

fix(component-manuscript-manager): fix double teams in user

parent e58cf3c7
No related branches found
No related tags found
1 merge request!14Sprint #15
......@@ -72,18 +72,11 @@ module.exports = models => async (req, res) => {
return userId
})
const reviewersTeam = await teamHelper.createTeam({
teamHelper.createTeam({
role: 'reviewer',
members: reviewerIds,
objectType: 'fragment',
})
reviewerIds.forEach(id =>
userHelper.updateUserTeams({
userId: id,
teamId: reviewersTeam.id,
}),
)
} else {
delete newFragment.invitations
await newFragment.save()
......@@ -110,13 +103,6 @@ module.exports = models => async (req, res) => {
await authorsTeam.save()
}
authorIds.forEach(id =>
userHelper.updateUserTeams({
userId: id,
teamId: authorsTeam.id,
}),
)
collectionHelper.updateStatusByRecommendation({
recommendation: heRecommendation.recommendation,
})
......
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