sdy

move variables position

......@@ -9,13 +9,15 @@ export default {
password,
password2,
email,
phoneNum,
bio,
avatarUrl,
phoneNum,
} = args;
if (password !== password2) {
throw new Error("two password aren't same each other");
}
const encryptPw = await bcrypt.hash(password, 10);
// TODO: Find user's country code and change new phone number value
const newPhoneNumber = await changePhoneNumber(phoneNum, "+82");
......@@ -23,10 +25,10 @@ export default {
data: {
username,
email,
bio,
avatarUrl,
password: encryptPw,
phoneNum: newPhoneNumber,
bio,
avatarUrl,
},
});
const token = generateToken(user.id);
......