sdy

update createAccount

......@@ -5,6 +5,5 @@ type Mutation {
password: String!
bio: String
avatarUrl: String
phoneNumber: String
): AuthPayload!
}
......
......@@ -4,14 +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, phoneNumber } = args;
const encryptPw = await bcrypt.hash(password, 10);
const user = await prisma.user.create({
data: {
......