aboutsummaryrefslogtreecommitdiffstats
path: root/mutations.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2018-02-13 19:35:40 -0800
committerAdam Soltys <[email protected]>2018-02-13 19:35:40 -0800
commit7e14da4e949a06da92b8b67024b2ef813512236f (patch)
tree93165fab7968197961bc77353ada789edbbdfc7c /mutations.js
parentd41cd218ff1ebab07f2bf8e84ffa0ca7deeb1a04 (diff)
downloadcoinos-server-7e14da4e949a06da92b8b67024b2ef813512236f.tar.gz
coinos-server-7e14da4e949a06da92b8b67024b2ef813512236f.zip
read from zmq and use socket.io instead of deepstream
Diffstat (limited to 'mutations.js')
-rw-r--r--mutations.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/mutations.js b/mutations.js
index 57332b7d..1d716e78 100644
--- a/mutations.js
+++ b/mutations.js
@@ -1,3 +1,4 @@
+import bcrypt from 'bcrypt'
import { resolver, defaultArgs, defaultListArgs, attributeFields } from 'graphql-sequelize'
import {
graphql,
@@ -31,6 +32,7 @@ module.exports = (db, gqltypes, lnrpc) => {
},
resolve: async (root, { user }) => {
user.address = (await lnrpc.newAddress({ type: 1 }, lnrpc.meta)).address
+ user.password = await bcrypt.hash(user.password, 1)
return db['User'].create(user)
}
},