Skip to content

Commit

Permalink
don't show success message if password reset request fails
Browse files Browse the repository at this point in the history
  • Loading branch information
timwis committed Sep 20, 2016
1 parent d6027b1 commit b544149
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = (db, initialState) => ({
uri: '/api/reset-password-init',
json: data
}, (err, response, body) => {
if (err) return done(err)
if (err || response.statusCode !== 200) return done(new Error('Error initializing password reset'))
send('ui:set', {resetPasswordInitSubmitted: true}, done)
})
},
Expand All @@ -65,7 +65,7 @@ module.exports = (db, initialState) => ({
uri: '/api/reset-password-confirm',
json: data
}, (err, response, body) => {
if (err) return done(err)
if (err || response.statusCode !== 200) return done(new Error('Error confirming password reset'))
send('ui:set', {resetPasswordConfirmSubmitted: true}, done)
})
}
Expand Down

0 comments on commit b544149

Please sign in to comment.