Skip to content

Commit

Permalink
#82 Refactor: 기획안 변경에 따른 도메인 수정 (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongyun1206 authored Sep 13, 2024
2 parents eaeb730 + 85cf4a5 commit 1e602cf
Show file tree
Hide file tree
Showing 42 changed files with 27 additions and 1,086 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,20 @@ public enum ErrorStatus implements BaseCode {
COMMENT_NOT_FOUND(HttpStatus.NOT_FOUND, "COMMENT4001", "댓글이 없습니다."),
COMMENT_HAS_RECOMMENTS(HttpStatus.BAD_REQUEST, "COMMENT4002", "대댓글이 있는 댓글은 완전 삭제할 수 없습니다."),
COMMENT_HAS_NO_RECOMMENTS(HttpStatus.BAD_REQUEST, "COMMENT4003", "대댓글이 없는 댓글입니다."),


RECOMMENT_NOT_FOUND(HttpStatus.NOT_FOUND, "RECOMMENT4001", "대댓글을 찾을 수 없습니다."),
NOT_YOUR_COMMENT(HttpStatus.BAD_REQUEST,"COMMENT4004", "댓글 작성자가 아닙니다."), // 대댓글의 경우에도 사용

// Wine class Error
WINE_CLASS_NOT_FOUND(HttpStatus.BAD_REQUEST, "WINECLASS4001", "와인 클래스가 없습니다."),
// WineNews Error
WINE_NEWS_NOT_FOUND(HttpStatus.BAD_REQUEST, "WINENEWS4001", "와인 뉴스가 없습니다."),

//WineClassBookMark Error
WINE_CLASS_BOOKMARK_UNAUTHORIZED(HttpStatus.UNAUTHORIZED, "WINE_CLASS_BOOKMARK4001", "권한이 없는 북마크입니다."),
WINE_CLASS_BOOKMARK_NOT_FOUND(HttpStatus.BAD_REQUEST, "WINE_CLASS_BOOKMARK4001", "와인 클래스 북마크가 없습니다."),
WINE_CLASS_BOOKMARK_DUPLICATED(HttpStatus.BAD_REQUEST, "WINE_CLASS_BOOKMARK4002", "이미 존재하는 북마크입니다."),


// WineNewsBookMark Error
WINE_NEWS_BOOKMARK_NOT_FOUND(HttpStatus.BAD_REQUEST, "WINENWSBOOKMARK4001", "와인 뉴스 북마크가 없습니다."),
WINE_NEWS_BOOKMARK_DUPLICATED(HttpStatus.BAD_REQUEST, "WINENWSBOOKMARK4002", "이미 존재하는 북마크입니다."),


// Member Error
MEMBER_NOT_FOUND(HttpStatus.BAD_REQUEST, "MEMBER4001", "회원이 없습니다."),
LOGIN_FAILED(HttpStatus.UNAUTHORIZED, "MEMBER4001", "로그인 과정에서 오류가 발생했습니다."),
Expand All @@ -72,13 +67,6 @@ public enum ErrorStatus implements BaseCode {
MATCH_PUBLIC_KEY_NOR_FOUND(HttpStatus.BAD_REQUEST, "APPLE4001", "일치하는 공개키를 찾을 수 없습니다"),
IDENTITY_TOKEN_NOT_FOUND(HttpStatus.BAD_REQUEST, "APPLE4002", "아이덴티티 토큰을 찾을 수 없습니다."),

// WineStore Error
WINE_STORE_NOT_FOUND(HttpStatus.BAD_REQUEST, "WINE_STORE4001", "와인 스토어가 없습니다."),
WINE_STORE_UNAUTHORIZED(HttpStatus.UNAUTHORIZED, "WINE_STORE4002", "권한이 없는 스토어입니다."),

// WineSale Error
WINE_SALE_NOT_FOUND(HttpStatus.BAD_REQUEST, "WINE_SALE4001", "와인 판매가 없습니다."),

// WineWishlist Error
WINE_WISHLIST_NOT_FOUND(HttpStatus.BAD_REQUEST, "WINE_WISHLIST4001", "와인 위시리스트가 없습니다."),
WINE_WISHLIST_UNAUTHORIZED(HttpStatus.UNAUTHORIZED, "WINE_WISHLIST4002", "권한이 없는 위시리스트입니다."),
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/drinkeg/drinkeg/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ public CorsConfiguration getCorsConfiguration(HttpServletRequest request) {
.requestMatchers(HttpMethod.PUT, "wine-class/**").hasRole("ADMIN")
.requestMatchers(HttpMethod.DELETE, "wine-class/**").hasRole("ADMIN")

// wine News 인가
.requestMatchers(HttpMethod.POST, "wine-news/**").hasRole("ADMIN")
.requestMatchers(HttpMethod.PUT, "wine-news/**").hasRole("ADMIN")
.requestMatchers(HttpMethod.DELETE, "wine-news/**").hasRole("ADMIN")

// Parties 인가
.requestMatchers(HttpMethod.GET, "parties/**").hasRole("USER")
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ public static WineClassResponseDTO toWineClassResponseDTO(WineClass wineClass) {
return WineClassResponseDTO.builder()
.id(wineClass.getId())
.title(wineClass.getTitle())
.video(wineClass.getVideoId())
.description(wineClass.getDescription())
.thumbnailUrl(wineClass.getThumbnailUrl())
.content(wineClass.getContent())
.build();
}

// WineClassResponseDTO를 WineCLass로 변환
public static WineClass toWineClass(WineClassRequestDTO wineClassRequestDTO) {
return WineClass.builder()
.title(wineClassRequestDTO.getTitle())
.videoId(wineClassRequestDTO.getVideoId())
.description(wineClassRequestDTO.getDescription())
.thumbnailUrl(wineClassRequestDTO.getThumbnailUrl())
.content(wineClassRequestDTO.getContent())
.build();
}
}

This file was deleted.

24 changes: 0 additions & 24 deletions src/main/java/com/drinkeg/drinkeg/converter/WineNewsConverter.java

This file was deleted.

25 changes: 0 additions & 25 deletions src/main/java/com/drinkeg/drinkeg/converter/WineSaleConverter.java

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1e602cf

Please sign in to comment.