-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[김민재] Assignment 2: Express API - 유저 회원가입 하기(암호화) #7
base: main
Are you sure you want to change the base?
Conversation
minjae/app.js
Outdated
/* | ||
const makeHash = async (password, saltRounds) => { | ||
return await bcrypt.hash(password, saltRounds); | ||
}; | ||
|
||
|
||
const getEncryptedPassword = async () => { | ||
const hashedPassword = await makeHash(password, saltRounds); | ||
console.log("다음은 암호화된 비밀번호 입니다: ", hashedPassword); | ||
}; | ||
|
||
|
||
getEncryptedPassword(); | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 불필요한 코드 주석을 삭제하여 주세요!~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
불필요한 주석 부분 삭제했습니다.
minjae/app.js
Outdated
|
||
await mySqlDataSource.query( | ||
"INSERT INTO westagram.users (user_id, password, name, phone, email, guest_yn) VALUES (?, ?, ?, ?, ?, ?);", | ||
[id, pwd, name, phone, email, guest_yn] | ||
[id, cryptedpassword, name, phone, email, guest_yn] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 해당 id 값은 회원 가입시, 클라이언트에게 전달되지 않는 것이 아니라, AUTO_INCREMENT에 의해 자동으로 고유값을 설정하는 데이터베이스의 성질을 이용해주시면 좋을 것 같네요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 변수명을 컬럼명과 동일하게 user_id로 변경했습니다.
:: 최근 작업 주제 (하나 이상의 주제를 선택해주세요.)
:: 구현 목표 - 해당 브랜치(PR)에서 구현하고자 하는 하나의 목표 작성
:: 구현 사항 설명 - 해당 브랜치(PR)에서 작업한 내용 작성
:: 테스트 결과 이미지
:: 기타 질문 및 특이 사항