diff --git a/server/src/main/java/com/yogit/server/board/repository/BoardUserRepository.java b/server/src/main/java/com/yogit/server/board/repository/BoardUserRepository.java index daa85ad..6864497 100644 --- a/server/src/main/java/com/yogit/server/board/repository/BoardUserRepository.java +++ b/server/src/main/java/com/yogit/server/board/repository/BoardUserRepository.java @@ -19,7 +19,7 @@ public interface BoardUserRepository extends JpaRepository { @Query("select bu from BoardUser bu where bu.user.id = :userId and bu.board.id = :boardId and bu.status = 'ACTIVE'") Optional findByUserIdAndBoardId(@Param("userId") Long userId, @Param("boardId") Long boardId); - @Query("select bu from BoardUser bu where bu.status = 'ACTIVE' and bu.user.id = :userId") + @Query("select bu from BoardUser bu where bu.status = 'ACTIVE' and bu.user.id = :userId and bu.board.status = 'ACTIVE'") Page findByUserId(Pageable pageable, @Param("userId") Long userId); @Query("select bu from BoardUser bu where bu.status = 'ACTIVE' and bu.board.id = :boardId")