Ocelot-Social/backend/src/helpers/encryptPassword.js
Robert Schäfer 10ae4abaae Use neode to bring User mutations under control
This commit takes all backend changes for signup and invite feature. I
was working on these features and removed the generated mutations for
type user along the way.
2019-07-03 15:58:42 +02:00

8 lines
163 B
JavaScript

import { hashSync } from 'bcryptjs'
export default function(args) {
args.encryptedPassword = hashSync(args.password, 10)
delete args.password
return args
}