sdy

remove password2

......@@ -3,7 +3,6 @@ type Mutation {
username: String!
email: String!
password: String!
password2: String!
phoneNum: String!
bio: String
avatarUrl: String
......
......@@ -4,19 +4,7 @@ import bcrypt from "bcryptjs";
export default {
Mutation: {
createAccount: async (_, args) => {
const {
username,
password,
password2,
email,
phoneNum,
bio,
avatarUrl,
} = args;
if (password !== password2) {
throw new Error("two password aren't same each other");
}
const { username, password, email, phoneNum, bio, avatarUrl } = args;
const encryptPw = await bcrypt.hash(password, 10);
// TODO: Find user's country code and change new phone number value
......