sdy

update createAccount

......@@ -5,5 +5,6 @@ type Mutation {
password: String!
bio: String
avatarUrl: String
phoneNum: String
): AuthPayload!
}
......
......@@ -4,7 +4,7 @@ import bcrypt from "bcryptjs";
export default {
Mutation: {
createAccount: async (_, args) => {
const { name, password, email, bio, avatarUrl, phoneNumber } = args;
const { name, password, email, bio, avatarUrl, phoneNum } = args;
const encryptPw = await bcrypt.hash(password, 10);
const user = await prisma.user.create({
data: {
......@@ -13,7 +13,7 @@ export default {
bio,
avatarUrl,
password: encryptPw,
phoneNumber,
phoneNum,
},
});
const token = generateToken(user.id);
......