aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2016-11-22 11:59:41 -0800
committerAdam Soltys <[email protected]>2016-12-26 14:22:39 -0800
commit013cd0962cdf230ea08f32e5c8027b8da2444e75 (patch)
tree906abf7424f6bf6c1bd0a0d6b0af7cd26e2a4b82 /src
parente92783c613fa4266b69f5d56257cf919c86182b7 (diff)
downloadcoinos-server-013cd0962cdf230ea08f32e5c8027b8da2444e75.tar.gz
coinos-server-013cd0962cdf230ea08f32e5c8027b8da2444e75.zip
Let users enter their phone number for notifications
Diffstat (limited to 'src')
-rw-r--r--src/routes/users.coffee8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/routes/users.coffee b/src/routes/users.coffee
index cff87d62..7b2f1f3a 100644
--- a/src/routes/users.coffee
+++ b/src/routes/users.coffee
@@ -179,8 +179,12 @@ module.exports = (sessions) ->
delete req.session.user.password
if req.body.password?
- bcrypt.hash(req.body.password, 12, (err, hash) ->
- db.hmset("user:#{req.params.user.toLowerCase()}", password: hash, ->
+ bcrypt.hash(req.body.password, 12, (err, password) ->
+ db.hmset("user:#{req.params.user.toLowerCase()}",
+ email: email
+ password: password
+ phone: phone
+ , ->
if req.xhr
res.send({})
res.end()