aboutsummaryrefslogtreecommitdiffstats
path: root/routes
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 /routes
parente92783c613fa4266b69f5d56257cf919c86182b7 (diff)
downloadcoinos-server-013cd0962cdf230ea08f32e5c8027b8da2444e75.tar.gz
coinos-server-013cd0962cdf230ea08f32e5c8027b8da2444e75.zip
Let users enter their phone number for notifications
Diffstat (limited to 'routes')
-rw-r--r--routes/users.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/routes/users.js b/routes/users.js
index 315287e2..56db583d 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -232,9 +232,11 @@
req.session.user = req.body;
delete req.session.user.password;
if (req.body.password != null) {
- return bcrypt.hash(req.body.password, 12, function(err, hash) {
+ return bcrypt.hash(req.body.password, 12, function(err, password) {
return db.hmset("user:" + (req.params.user.toLowerCase()), {
- password: hash
+ email: email,
+ password: password,
+ phone: phone
}, function() {
if (req.xhr) {
res.send({});