Showing
2 changed files
with
1 additions
and
9 deletions
... | @@ -4,14 +4,7 @@ import bcrypt from "bcryptjs"; | ... | @@ -4,14 +4,7 @@ import bcrypt from "bcryptjs"; |
4 | export default { | 4 | export default { |
5 | Mutation: { | 5 | Mutation: { |
6 | createAccount: async (_, args) => { | 6 | createAccount: async (_, args) => { |
7 | - const { | 7 | + const { name, password, email, bio, avatarUrl, phoneNumber } = args; |
8 | - name, | ||
9 | - password, | ||
10 | - email, | ||
11 | - bio = "", | ||
12 | - avatarUrl = "", | ||
13 | - phoneNumber = "", | ||
14 | - } = args; | ||
15 | const encryptPw = await bcrypt.hash(password, 10); | 8 | const encryptPw = await bcrypt.hash(password, 10); |
16 | const user = await prisma.user.create({ | 9 | const user = await prisma.user.create({ |
17 | data: { | 10 | data: { | ... | ... |
-
Please register or login to post a comment