From a4d58dc7f9f6cf9bc6fb0ea73a566007de2a3c0d Mon Sep 17 00:00:00 2001 From: Anna-Jin Date: Thu, 28 Jul 2022 00:49:37 +0900 Subject: [PATCH] =?UTF-8?q?#18=20[Refactor]=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../baechelin/config/security/SecurityConfig.java | 2 +- .../baechelin/store/dto/StoreCardResponseDto.java | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/mpnp/baechelin/config/security/SecurityConfig.java b/src/main/java/com/mpnp/baechelin/config/security/SecurityConfig.java index 95d9c78..1604a27 100644 --- a/src/main/java/com/mpnp/baechelin/config/security/SecurityConfig.java +++ b/src/main/java/com/mpnp/baechelin/config/security/SecurityConfig.java @@ -60,7 +60,7 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .and() .authorizeRequests() .requestMatchers(CorsUtils::isPreFlightRequest).permitAll() // cors 요청 허용 - .antMatchers("/review", "/api/bookmark", "/store/register", "/userinfo").hasAnyAuthority(RoleType.USER.getCode(), RoleType.ADMIN.getCode()) + .antMatchers("/review", "/api/bookmark", "/store/register", "/user").hasAnyAuthority(RoleType.USER.getCode(), RoleType.ADMIN.getCode()) .antMatchers("/admin/**").hasAnyAuthority(RoleType.ADMIN.getCode()) .antMatchers("/**").permitAll() // 그 외 요청은 모두 허용 .anyRequest().authenticated() // 위의 요청 외의 요청은 무조건 권한검사 diff --git a/src/main/java/com/mpnp/baechelin/store/dto/StoreCardResponseDto.java b/src/main/java/com/mpnp/baechelin/store/dto/StoreCardResponseDto.java index fef5d02..9a354e9 100644 --- a/src/main/java/com/mpnp/baechelin/store/dto/StoreCardResponseDto.java +++ b/src/main/java/com/mpnp/baechelin/store/dto/StoreCardResponseDto.java @@ -16,7 +16,7 @@ @Getter @Setter @Builder @Slf4j -public class StoreCardResponseDto implements Comparable { +public class StoreCardResponseDto { private long storeId; private String category; private String name; @@ -29,7 +29,7 @@ public class StoreCardResponseDto implements Comparable { private String phoneNumber; private String heightDifferent; private String approach; - private List storeImgList = new ArrayList<>(); + private List storeImgList; private int bookmarkCount; private String bookmark; @@ -52,17 +52,6 @@ public StoreCardResponseDto(Store store) { this.bookmarkCount = store.getBookMarkCount(); } - @Override - public int compareTo(StoreCardResponseDto sad) { - if (this.pointAvg > sad.pointAvg) { - return -1; - } else if (this.pointAvg < sad.pointAvg) { - return 1; - } - return 0; - } - - public StoreCardResponseDto(Store store, String isBookMark) { this.storeId = store.getId(); this.category = store.getCategory();