-
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
feat: add token setting and store setting #39
Conversation
src/pages/answer-create/index.tsx
Outdated
const userInfo = res.data.data; | ||
setUserNicname(userInfo.nickname); | ||
|
||
answerAPI.create({ | ||
memberId: Number(storedId), | ||
memberId: Number(userId), |
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 와 member ID... 통일 했으면 좋겠는데 다른 분들 의견은 어떤가요?
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.
userId가 좋을 것 같네요! 여기는 number타입으로 받고있군요 😢
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.
저는 userId와 memberId는 명확하게 다른거라고 생각하는데, 지금 저희가 쓰는 느낌으로는 ㅡmemberId보단 userId가 더 적합해보이기는하네요
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.
member는 어떤 그룹에 속한 느낌이고 user는 유저의 계정 그 자체를 표현하는거라고 생각합니다!
유저와 유저 아이디는 1:1이고, 유저와 멤버아이디는 1:n인거죠!
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.
고생하셨습니다!
현재 여러 곳에서 String(userId)
로 타입을 변환하는 패턴이 반복되고있네요.
store에서 userId를 저장할 때부터 String타입으로 관리하면 좋을 것 같습니다!
맞습니다!ㅠㅠ 그런데 api마다 같은 userId이지만 타입이 number와 string으로 다르게 설정된 경우가 있습니다. api type을 일치시키면 문제가 해결될 것 같아요, id의 경우 number 유지가 맞다고 생각되는데 괜찮다면 number로 일치시켜도 괜찮을까요 |
네 좋습니다! |
apply the rules except those set to key values in the post method param
리뷰 사항 반영하였습니다.
|
무엇을 위한 PR인가요?
변경사항 및 이유
PR 특이 사항
Issue Number
#15