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

Feature/#105 #110

Merged
merged 8 commits into from
Sep 4, 2024
Merged

Feature/#105 #110

merged 8 commits into from
Sep 4, 2024

Conversation

GayeongKimm
Copy link
Member

현재 : 회원가입시 DEACTIVATE로 가입
변경 : 회원가입시 PENDING으로 가입
추가 : 유저 불러올때 ACITVE, DEACTIVATE 메서드가 분리되어있음 -> 메서드를 하나로 통일 후 파라미터를 통해 상태를 받아 반환

@GayeongKimm GayeongKimm linked an issue Sep 4, 2024 that may be closed by this pull request
@@ -40,6 +41,11 @@ public Response delete(@PathVariable String id) {
return commandUseCase.delete(id);
}

@PatchMapping("/status/{id}")
public Response updateStatus(@PathVariable("id") String id, @RequestParam ActiveStatus status){
Copy link
Member

Choose a reason for hiding this comment

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

("id")는 삭제해도 될 것 같습니다

@@ -51,6 +51,13 @@ public ResponseData<List<MemberInfoRes>> getDeactivateMembers() {
.toList());
}

public ResponseData<List<MemberInfoRes>> getPendingMembers(){
return ResponseData.ok("보류중인 멤버 조회 성공", memberRepository.findByStatusOrderByStudent(ActiveStatus.PENDING)
Copy link
Member

Choose a reason for hiding this comment

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

보류 -> 대기 라고 바꿔도 좋을 것 같습니다

Copy link
Member Author

Choose a reason for hiding this comment

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

해당 메서드도 pending만 불러오는것이 아닌 한개의 메서드로 통일시켜 파라미터로 구분하도록 수정하겠습니다

@@ -15,7 +15,7 @@ public enum MemberExceptionCode implements ExceptionCode {
TEACHER_NOT_FOUND(404, "없는 선생님"),
MEMBER_DUPLICATION(409, "이미 존재하는 멤버"),
BROADCAST_CLUB_MEMBER_DUPLICATION(409, "이미 존재하는 방송부원"),
UNMODIFIABLE_ROLE(403, "해당 유저는 수정이 불가합니다");
UNAUTHORIZED(403, "권한 없음");
Copy link
Member

Choose a reason for hiding this comment

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

바꾼 이유가 궁금합니다.

Copy link
Member Author

Choose a reason for hiding this comment

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

UNMODIFIABLE_ROLE는 목적인 대상을 수정 할 수 없다는 뜻이고
UNAUTHORIZED는 사용자의 권한이 없다는 뜻입니다.
에러의 네이밍이 사용하는데 헷갈릴것같아 수정하였습니다.

Copy link
Member

Choose a reason for hiding this comment

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

http에서 unauthorized는 401을 의미하기 때문에 다른 네이밍을 고려하는게 좋을 것 같아요.

Copy link
Member

Choose a reason for hiding this comment

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

코드 한 번 보니까, 해당 exception code를 사용하는 곳이 없어서 해당 라인을 없애는게 좋아보이네요

Copy link
Member

@suw0n suw0n left a comment

Choose a reason for hiding this comment

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

어드민에서 deactivate된 회원들을 조회하는 기능이 있는데, 쿼리 날릴 때 pending으로 조회하도록 수정해주세요. (이거 하기 전에 기존 deactivate 회원 상태를 pending으로 바꿔야함)

@@ -83,6 +83,13 @@ public Response delete(String id) {
return Response.noContent("멤버 삭제 성공");
}

@CacheEvict(value = "members-cache", key = "'activeMembers'")
public Response status(String id, ActiveStatus status) {
Copy link
Member

Choose a reason for hiding this comment

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

updateStatus 같이 동사를 추가해서 네이밍해주세요

Copy link
Member Author

Choose a reason for hiding this comment

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

현재 updateStatus메서드를 사용하는 기존 메서드가 있어서 임시로 네이밍을 해뒀습니다
웹에서 변경사항에 맞춰 수정하면 기존메서드를 삭제하고 메서드 명도 updateStatus로 변경할 예정입니다.

@GayeongKimm GayeongKimm merged commit 90b1acd into master Sep 4, 2024
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.

Chore: MemberStatus 및 불러오기 수정
3 participants