Skip to content

민경준 2주차 과제 #1

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nihaojohn0609
Copy link

회원을 등록하지 않고 비밀번호 변경을 시도한다.(오류 발생)
image

Comment on lines +50 to +53
@PostMapping("/members/loginIdAsc")
public List<MemberResponse> searchMembersByIdAsc(@RequestParam String memberId) {
return memberService.AllMembersWithLoginIdDesc(memberId);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 잘 작성해주신 것 같습니다.
다만 Post 요청은 보통 데이터를 추가할 때, 또는 변경할 때 사용하므로
GET 요청으로 하는게 조금 더 의미에 와닿을 것 같습니다.

Suggested change
@PostMapping("/members/loginIdAsc")
public List<MemberResponse> searchMembersByIdAsc(@RequestParam String memberId) {
return memberService.AllMembersWithLoginIdDesc(memberId);
}
@GetMapping("/members/loginIdAsc")
public List<MemberResponse> searchMembersByIdAsc(@RequestParam String memberId) {
return memberService.AllMembersWithLoginIdDesc(memberId);
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 지적 감사합니다!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants