Skip to content

Commit

Permalink
[Refactor] 커뮤니티 카테고리명 변경 #246 (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
yr0202 authored Feb 10, 2025
2 parents a59b1c4 + 8aaa34c commit df71d3e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ public enum ResponseCode implements Codable {
NOT_EXIST_FORTUNE_USER_INFO("6133", HttpStatus.BAD_REQUEST, "해당 사주 정보를 찾을 수 없습니다."),
NOT_EXIST_USER_RELATION("6134", HttpStatus.BAD_REQUEST, "해당 사주 관계를 찾을 수 없습니다."),
NOT_CHANGED_RELATION("6135", HttpStatus.BAD_REQUEST, "본인 관계는 수정할 수 없습니다."),
NOT_MATCHING_PEOPLE("6135", HttpStatus.BAD_REQUEST, "추천된 사용자 리스트가 없습니다."),
NOT_UPDATED_SHARE_FORTUNE_CATEGORY("6136", HttpStatus.BAD_REQUEST, "운세공유 게시판은 수정이 불가합니다."),
NOT_MATCHING_PEOPLE("6136", HttpStatus.BAD_REQUEST, "추천된 사용자 리스트가 없습니다."),
NOT_UPDATED_SHARE_BOARD_CATEGORY("6137", HttpStatus.BAD_REQUEST, "운세공유 게시판은 수정이 불가합니다."),


// 유효성 검사 오류 (형식: 62xx)
NOT_LITERAL("6211", HttpStatus.BAD_REQUEST, "문자열 형식이 아님"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
public enum CommunityCategory {
FREE_BOARD, // 자유 게시판
ANONYMOUS_BOARD, // 익명 게시판
SHARE_FORTUNE_BOARD; // 운세 공유 게시판
SHARE_BOARD; // 운세 공유 게시판
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
public enum CommunityListCategory {
FREE_BOARD, // 자유 게시판
ANONYMOUS_BOARD, // 익명 게시판
SHARE_FORTUNE_BOARD, // 운세 공유 게시판
SHARE_BOARD, // 운세 공유 게시판
POPULAR_BOARD;
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public Post update(String memberId, Long postId, PostUpdateRequest postUpdateReq
public Post updatePostAndImgFiles(String memberId, Long postId, PostUpdateRequest postUpdateRequest,
List<MultipartFile> fileList) {

if (postUpdateRequest.getCategory() == CommunityCategory.SHARE_FORTUNE_BOARD) {
throw new GeneralException(ResponseCode.NOT_UPDATED_SHARE_FORTUNE_CATEGORY);
if (postUpdateRequest.getCategory() == CommunityCategory.SHARE_BOARD) {
throw new GeneralException(ResponseCode.NOT_UPDATED_SHARE_BOARD_CATEGORY);
}

Post updatedPost = update(memberId, postId, postUpdateRequest);
Expand Down

0 comments on commit df71d3e

Please sign in to comment.