Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xpub-faraday
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
xpub
xpub-faraday
Commits
232db215
Commit
232db215
authored
6 years ago
by
Sebastian Mihalache
Browse files
Options
Downloads
Patches
Plain Diff
fix(component-user-manager): add submitting author as owner to collection"
parent
c0eb479b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!14
Sprint #15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/component-user-manager/src/routes/fragmentsUsers/post.js
+8
-1
8 additions, 1 deletion
.../component-user-manager/src/routes/fragmentsUsers/post.js
with
8 additions
and
1 deletion
packages/component-user-manager/src/routes/fragmentsUsers/post.js
+
8
−
1
View file @
232db215
...
...
@@ -81,12 +81,17 @@ module.exports = models => async (req, res) => {
})
}
await
fragmentHelper
.
addAuthor
({
fragmentHelper
.
addAuthor
({
user
,
isSubmitting
,
isCorresponding
,
})
if
(
!
collection
.
owners
.
includes
(
user
.
id
))
{
collection
.
owners
.
push
(
user
.
id
)
collection
.
save
()
}
return
res
.
status
(
200
).
json
({
...
pick
(
user
,
authorKeys
),
isSubmitting
,
...
...
@@ -125,6 +130,8 @@ module.exports = models => async (req, res) => {
})
if
(
!
collection
.
owners
.
includes
(
newUser
.
id
))
{
collection
.
owners
.
push
(
newUser
.
id
)
collection
.
save
()
mailService
.
sendSimpleEmail
({
toEmail
:
newUser
.
email
,
user
:
newUser
,
...
...
This diff is collapsed.
Click to expand it.
Alexandru Munteanu
@malexsan1
·
6 years ago
Maintainer
LGTM
:+1: LGTM
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment