Skip to content
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

[bug] memberId로 User 객체를 조회하는 문제 #233

Closed
1 task done
hoonyworld opened this issue Oct 6, 2024 · 0 comments · Fixed by #234
Closed
1 task done

[bug] memberId로 User 객체를 조회하는 문제 #233

hoonyworld opened this issue Oct 6, 2024 · 0 comments · Fixed by #234
Assignees
Labels
bug 🐞 Something isn't working 동훈🐻

Comments

@hoonyworld
Copy link
Member

hoonyworld commented Oct 6, 2024

Bug/Fix Issue 📌

image image
  • User 객체를 userId로 조회해야 할 곳에서 memberId로 조회를 하고 있었기 때문에 문제가 발생했습니다.
  • 유저 "이미영" memberId는 11, userId는 14입니다.
  • 그런데 User 객체를 id 14로 조회를 했어야 하나, memberId인 11이 들어갔고, User 테이블에 userId 11인 유저의 role이 USER 였기에 토큰의 권한이 USER로 잘못 설정되어 있던 것입니다.
  • 따라서 userId로 User객체를 조회하도록 코드를 변경하고자 합니다.

Todo ✔️

  • userId로 User객체를 조회하도록 변경
@hoonyworld hoonyworld self-assigned this Oct 6, 2024
@hoonyworld hoonyworld added bug 🐞 Something isn't working 동훈🐻 labels Oct 6, 2024
hoonyworld added a commit that referenced this issue Oct 6, 2024
hoonyworld added a commit that referenced this issue Oct 6, 2024
* [#233] refactor(MemberUseCase): 메서드 이름 변경 및 추가 메서드 선언

* [#233] refactor(AdminFacade): 메서드 이름 변경사항 반영

* [#233] refactor(AdminFacade): findUserByMemberId 삭제 및 메서드 이름 변경 및 읽기 전용 트랜잭션 선언

* [#233] feat(UserUseCase): userId로 User 객체를 조회하는 메서드 선언

* [#233] feat(UserService): userId로 User 객체를 조회하는 메서드 구현

* [#233] fix(SocialLoginService): memberId로 Member 객체를 조회 후 그 회원의 userId로 User 객체를 조회하도록 수정

* [#233] refactor(SocialLoginService): Member 객체에서 직접 Users 객체를 참조하도록 변경
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working 동훈🐻
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant