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
2b6da25c
Commit
2b6da25c
authored
6 years ago
by
Sebastian Mihalache
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of gitlab.coko.foundation:xpub/xpub-faraday into develop
parents
3dbfa9cd
a7ba9169
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/components-faraday/src/components/utils.js
+7
-4
7 additions, 4 deletions
packages/components-faraday/src/components/utils.js
with
7 additions
and
4 deletions
packages/components-faraday/src/components/utils.js
+
7
−
4
View file @
2b6da25c
import
{
actions
}
from
'
pubsweet-client
'
import
{
actions
}
from
'
pubsweet-client
'
import
{
SubmissionError
}
from
'
redux-form
'
import
{
SubmissionError
}
from
'
redux-form
'
import
{
get
,
find
,
capitalize
,
pick
}
from
'
lodash
'
import
{
get
,
find
,
capitalize
,
pick
}
from
'
lodash
'
import
{
update
}
from
'
pubsweet-client/src/helpers/api
'
import
{
update
,
create
}
from
'
pubsweet-client/src/helpers/api
'
export
const
parseTitle
=
version
=>
{
export
const
parseTitle
=
version
=>
{
const
title
=
get
(
version
,
'
metadata.title
'
)
const
title
=
get
(
version
,
'
metadata.title
'
)
...
@@ -147,9 +147,12 @@ export const onSubmitUser = (values, dispatch, { setEditMode }) =>
...
@@ -147,9 +147,12 @@ export const onSubmitUser = (values, dispatch, { setEditMode }) =>
})
})
.
catch
(
handleFormError
)
.
catch
(
handleFormError
)
// Temporary till API implementation
export
const
onSubmitChangePassword
=
(
export
const
onSubmitChangePassword
=
(
values
,
dispatch
,
{
history
,
user
})
=>
{
password
,
newPassword
},
update
(
`/users/
${
values
.
id
}
`
,
parseUpdateUser
(
values
))
dispatch
,
{
history
},
)
=>
create
(
`/users/change-password`
,
{
password
,
newPassword
})
.
then
(()
=>
{
.
then
(()
=>
{
history
.
goBack
()
history
.
goBack
()
})
})
...
...
This diff is collapsed.
Click to expand it.
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