Skip to content

Conversation

@ayoung-dev
Copy link
Collaborator

resolved :

📌 과제 설명

커뮤니티 게시글 수정 기능

👩‍💻 요구 사항과 구현 내용

커뮤니티 게시글 수정 기능 구현

✅ PR 포인트 & 궁금한 점

  • ExceptionMessage를 "해당 게시글에 권한이 없습니다."로 해두었는데
    "자신이 작성한 커뮤니티 게시글이 아닙니다."로 통일하는게 좋을까요?

@ayoung-dev ayoung-dev self-assigned this Nov 27, 2024
@ayoung-dev ayoung-dev linked an issue Nov 27, 2024 that may be closed by this pull request
1 task
Copy link
Collaborator

@leebs0521 leebs0521 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다


//when
ThrowableAssert.ThrowingCallable callable = () -> updateCommunityBoardService.updateCommunityBoard(dto, communityId, UUID.randomUUID(), null);

Copy link
Collaborator

Choose a reason for hiding this comment

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

ThrowingCallable 이거 좋은것 같아요.
when 에서 에러가 발생하는 동작을 이렇게 뺄수있군요..

@7zrv
Copy link
Collaborator

7zrv commented Nov 27, 2024

"해당 게시글에 권한이 없습니다. " 라는 표현이
여러 예외상황을 하나로 묶어줄수 있을거 같아서 저는 더 좋은거 같아요

- command/query 패키지 삭제
@sonarqubecloud
Copy link

Copy link
Collaborator

@m-a-king m-a-king left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

Comment on lines +13 to 14
UNAUTHORIZED_COMMUNITY_BOARD("해당 게시글에 권한이 없습니다."),
NOT_EXISTS_LOCATION("존재하지 않는 위치 ID 입니다."),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
UNAUTHORIZED_COMMUNITY_BOARD("해당 게시글에 권한이 없습니다."),
NOT_EXISTS_LOCATION("존재하지 않는 위치 ID 입니다."),
NOT_FOUND("%s를 찾을 수 없습니다."),
UNAUTHORIZED("%s에 대한 권한이 없습니다."),

이렇게 사용하고 아래에서 메시지 게터에 도메인이나 맥락에 대해서 동적으로 파라미터를 사용하는 방법은 어떨까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

다 같이 얘기해보면 좋을 거 같아요!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

@m-a-king m-a-king left a comment

Choose a reason for hiding this comment

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

ExceptionMessage를 "해당 게시글에 권한이 없습니다."로 해두었는데
"자신이 작성한 커뮤니티 게시글이 아닙니다."로 통일하는게 좋을까요?

--> 후자는 프론트에서 하면 좋을 것 같아요~

@ayoung-dev ayoung-dev merged commit fb13a49 into main Nov 27, 2024
2 checks passed
@ayoung-dev ayoung-dev deleted the feature/56-add-community-board-update branch November 27, 2024 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] 커뮤니티 게시글 수정 기능

5 participants