-
Notifications
You must be signed in to change notification settings - Fork 2
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 : 다른 유저 정보 조회 API 추가 #158
Conversation
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.
수고하셨어요!! 코멘트 고려 부탁합니다-!
@@ -167,4 +167,12 @@ public ResponseEntity<Void> editStudyGroupVisibility(@AuthedUser User user, | |||
studyGroupService.editStudyGroupVisibility(user, request); | |||
return ResponseEntity.ok().build(); | |||
} | |||
|
|||
@GetMapping(value = "other-user-group_list") |
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.
엔드포인트에 이상한 언더바가 끼워져있어요..!
그리고 이 부분은 @PathVariable
을 사용하는게 더 좋아보여요! 모르신다면 찾아보길 권장드립니다
Github도 url 보면 사용자 닉네임 들어가듯이 /api/{userId}/group
뭐 이런식으로 쓰이는건데 이 API에서는 이런식의 엔드포인트가 더 적절하지 않을까 싶습니담
@@ -167,4 +167,12 @@ public ResponseEntity<Void> editStudyGroupVisibility(@AuthedUser User user, | |||
studyGroupService.editStudyGroupVisibility(user, request); | |||
return ResponseEntity.ok().build(); | |||
} | |||
|
|||
@GetMapping(value = "other-user-group_list") | |||
@Operation(summary = "그룹 목록 조회 API", description = "방장 여부 상관 없이 유저가 참여하고 있는 그룹 모두 조회") |
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.
[nit] Swagger summary가 위에 현재 유저의 그룹 목록 조회랑 겹칩니다.
로직상 문제는 없지만 프론트 배려를 위해 더 정확한 메세지로 명시해줍시다!
@@ -432,4 +432,47 @@ public void editStudyGroupVisibility(User user, EditGroupVisibilityRequest reque | |||
member.updateVisibility(request.isVisible()); | |||
log.info("success to update group visibility ( userId : {} )", user.getId()); | |||
} | |||
|
|||
@Transactional(readOnly = true) | |||
public GetStudyGroupListsResponse getOtherStudyGroupList(Long targetUserId) { |
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.
아 리뷰 해놓고 서브밋 안함;;
build.gradle
Outdated
// QueryDSL | ||
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' | ||
annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta" |
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.
QueryDSL 이미 바로 위쪽에 선언되어있어요
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.
덜 지워졌어요
@@ -167,4 +167,12 @@ public ResponseEntity<Void> editStudyGroupVisibility(@AuthedUser User user, | |||
studyGroupService.editStudyGroupVisibility(user, request); | |||
return ResponseEntity.ok().build(); | |||
} | |||
|
|||
@GetMapping(value = "other-user-group_list") |
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.
underscore(_) 말고 dash(-)로 써주세요. 혼용되어있어요
@@ -167,4 +167,12 @@ public ResponseEntity<Void> editStudyGroupVisibility(@AuthedUser User user, | |||
studyGroupService.editStudyGroupVisibility(user, request); | |||
return ResponseEntity.ok().build(); | |||
} | |||
|
|||
@GetMapping(value = "other-user-group_list") | |||
@Operation(summary = "그룹 목록 조회 API", description = "방장 여부 상관 없이 유저가 참여하고 있는 그룹 모두 조회") |
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.
operation 설명이 list랑 완전히 동일한데, 수정해주세요
|
||
@GetMapping(value = "otheruser-info") | ||
@Operation(summary = "타회원정보조회 API") | ||
public ResponseEntity<UserInfoResponse> OtherUserInfo(@AuthedUser User user, @RequestParam Long targetUserId) { |
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.
함수명은 동사형으로 써주세요
피드백 다 반영했슴다~ |
@@ -127,4 +127,11 @@ public ResponseEntity<Void> checkNickname(@RequestParam String nickname) { | |||
userService.checkNickname(nickname); | |||
return ResponseEntity.ok().build(); | |||
} | |||
|
|||
@GetMapping(value = "otheruser-info") |
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.
얘도 PathVariable 사용하면 더 좋을 것 같아요-!
@@ -167,4 +167,12 @@ public ResponseEntity<Void> editStudyGroupVisibility(@AuthedUser User user, | |||
studyGroupService.editStudyGroupVisibility(user, request); | |||
return ResponseEntity.ok().build(); | |||
} | |||
|
|||
@GetMapping(value = "/{targetUserId}/list") |
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가 좋아보입니다!
다시 반영 해 놨슴다~! |
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.
LGTM-
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.
Conflict resolve 하고 머지해주세요~~
📌 Related Issue
#152
🚀 Description
📢 Review Point
📚Etc (선택)