-
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
아이디 찾기 #180
The head ref may contain hidden characters: "feature/\uC544\uC774\uB514_\uCC3E\uAE30"
아이디 찾기 #180
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #180 +/- ##
=============================================
+ Coverage 90.35% 90.49% +0.13%
- Complexity 779 795 +16
=============================================
Files 127 130 +3
Lines 2168 2189 +21
Branches 59 59
=============================================
+ Hits 1959 1981 +22
- Misses 179 180 +1
+ Partials 30 28 -2
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
개인적으로 나는 url이 아닌 request body를 통한 POST 요청으로 보내는게 맞다고 생각.
API를 변경하는 것이 어떨까? 그리고 만약 이렇게 수정한다면 상태코드가 404가 아닌, 400으로 변경하는 것이 더 좋아보여.
findById는 IlliegalArgumentException findByStudentNumber은 NotSuchElementException인 것도 올바르지 않은 url이라 다른 상태 코드를 반환한다고 일어난 일이니까.
public static UserAuthIdResponse from(String encryptedAutId, String studentNumber) { | ||
return UserAuthIdResponse.builder() | ||
.authId(encryptedAutId) | ||
.studentNumber(studentNumber).build(); | ||
} |
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.
from -> of
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 user = findUserPort.findUserByStudentNumber(studentNumber) | ||
.orElseThrow(() -> new NoSuchElementException("해당 학번의 사용자가 존재하지 않습니다")); |
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.
request body로 하고 400으로 수정해버리자. 기존 api 수정할 사항 있으면 그냥 하자.
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.
음 저는 400번 보다는 404가 맞는거 같은게 학번으로 조회하는 요청 자체는 잘못된 요청이 아니고 찾으려는 자원이 존재하지 않는거니 404가 더 알맞은 에러코드인거 같습니다.
음 조회 메서드인데 POST 요청이 맞을까요?? 저는 GET 요청에 query string으로 유저 학번이 더 좋아보입니다..! |
Kudos, SonarCloud Quality Gate passed! 0 Bugs 0.0% Coverage The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
Issue
Close #179
✅ 작업 내용
🤔 고민 했던 부분
🔊 도움이 필요한 부분!!
(다만, 프론트 엔드 개발자와 공유된 내용이 아니기 때문에 기존 api 명세대로 기능 구현 완료했습니다!)