Skip to content

Commit

Permalink
fix: issue with not being able to clear out signature, fixes #955
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsey committed Oct 5, 2020
1 parent 3bb2f95 commit 7d4752d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/ept-users/routes/update.js
Expand Up @@ -123,6 +123,11 @@ module.exports = {
]
},
handler: function(request) {
var returnEmptySig = false;
if (request.payload.raw_signature === '') {
request.payload.signature = '';
returnEmptySig = true;
}
// update the user in db
request.payload.id = request.params.id;
var promise = request.db.users.update(request.payload)
Expand All @@ -134,6 +139,10 @@ module.exports = {
delete user.password;
delete user.confirmation;
delete user.email_password;
if (returnEmptySig) {
user.signature = '';
user.raw_signature = '';
}
return user;
})
.then(function(user) {
Expand Down

0 comments on commit 7d4752d

Please sign in to comment.