From d05c81af5d86ad84912a5c64467d5a1a2390efaa Mon Sep 17 00:00:00 2001 From: yooonwodyd Date: Fri, 15 Nov 2024 01:26:13 +0900 Subject: [PATCH 1/2] refactor:[#84]- refact Security MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 유저 API 접근 가능하도록 변경 --- .../com/helpmeCookies/global/security/WebSecurityConfig.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/helpmeCookies/global/security/WebSecurityConfig.java b/src/main/java/com/helpmeCookies/global/security/WebSecurityConfig.java index 2318820..324eb79 100644 --- a/src/main/java/com/helpmeCookies/global/security/WebSecurityConfig.java +++ b/src/main/java/com/helpmeCookies/global/security/WebSecurityConfig.java @@ -74,7 +74,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { "/v1/products/**", "/v1/reviews/**", "/ws/**", - "/v1/artists/**" + "/v1/artists/**", + "/v1/users/**" ).permitAll() .anyRequest().authenticated() ).exceptionHandling((exception) -> exception From 939284fcaaf76e77fa55c3caa52be6550cd8edd7 Mon Sep 17 00:00:00 2001 From: bokyeong Date: Fri, 15 Nov 2024 01:28:56 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat=20:=20=EC=B0=9C=20=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=A1=B0=ED=9A=8C=EC=9A=A9=20repository?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/repository/ProductLikeRepository.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/helpmeCookies/product/repository/ProductLikeRepository.java b/src/main/java/com/helpmeCookies/product/repository/ProductLikeRepository.java index 46a5bef..d48fc18 100644 --- a/src/main/java/com/helpmeCookies/product/repository/ProductLikeRepository.java +++ b/src/main/java/com/helpmeCookies/product/repository/ProductLikeRepository.java @@ -4,10 +4,14 @@ import com.helpmeCookies.product.entity.Product; import com.helpmeCookies.user.entity.User; import java.util.Optional; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface ProductLikeRepository extends JpaRepository { Optional findDistinctFirstByUserAndProduct(User user, Product product); + + Page findAllByUser(User user, Pageable pageable); }