Replies: 2 comments 1 reply
-
그런데 방금 번뜩 떠오른게 |
Beta Was this translation helpful? Give feedback.
0 replies
-
지금 PR #52 에 적용한 방법이 여기서 설명해주신 방법인거죠? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
제가 계속 api를 뜯으면서 열심히 고민한 결과, 지금 회원가입시 fullName을 파싱하는 과정에서
이미 username이라는 회원 정보 수정 api가 있음에도 불구하고 fullName을 동시에 처리하는 과정에서 충돌이 생겨
회원 정보 수정에서 오류가 발생하는 것 같습니다.
이를 해결하기 위해서는 회원가입 창 에서는 이름, 이메일, 비밀번호를 입력하고
바로 다음에 닉네임 설정 창으로 이동하게 되어 닉네임까지 설정하면 로그인이 되는 방식으로 해야 할 것 같다는 생각이 듭니다.
📍 다음은 GPT의 의견입니다.
오류를 해결할 수 있는 이유
회원가입 시: fullName 필드에 단순히 이름만 저장하고, 회원가입 후 닉네임을 설정하는 별도의 과정을 거치면, fullName과 username이 API의 요청과 일관되게 처리됩니다.
회원정보 수정 시: fullName 필드에 이름과 자기소개를 JSON으로 저장하고, username은 닉네임으로 처리하면 API에서 요구하는 방식에 맞춰 데이터가 일관되게 유지됩니다. 이렇게 하면 데이터가 제대로 유지되고, 수정할 때 null로 변경되는 문제도 방지할 수 있습니다.
닉네임 설정 분리: 회원가입 후 닉네임 설정을 모달로 처리하면서 username을 따로 업데이트하므로, API가 기대하는 방식대로 닉네임이 제대로 저장됩니다.
요약
회원가입 시: email, fullName(이름), password만 저장.
닉네임 설정 모달: username(닉네임) 설정 후 API에 저장.
회원정보 수정 시: fullName에 이름과 자기소개를 JSON 형식으로 저장하고, username(닉네임)도 업데이트.
이 방식을 사용하면 데이터 일관성 문제를 해결할 수 있어, 이전에 발생한 null 값 문제도 발생하지 않도록 할 수 있습니다.
이런 식으로 설명을 해주고 있는 상황입니다. 이게 되는지 안되는지 우선 다시 구현을 해 봐야 할 것 같아,
Ideas에 올려 놓고 여러분들의 의견을 듣고 싶습니다!
일단 더이상 지체되면 안되니까, 따로 코드 저장해두고 저 방식대로 진행했을 때 오류가 나지 않는다면, 다시 말씀드리겠습니다..!
Beta Was this translation helpful? Give feedback.
All reactions