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 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); }