added refresh token
This commit is contained in:
@@ -12,7 +12,6 @@ public interface FavoriteRepository extends JpaRepository<Favorite, Long> {
|
||||
boolean existsByUserAndPost(User user, Post post);
|
||||
List<Favorite> findByUser(User user);
|
||||
void deleteByUserAndPost(User user, Post post);
|
||||
void deleteByPost(Post post);
|
||||
void deleteByPostIn(List<Post> posts);
|
||||
|
||||
@Query("""
|
||||
@@ -24,10 +23,10 @@ public interface FavoriteRepository extends JpaRepository<Favorite, Long> {
|
||||
|
||||
// ADD THIS METHOD:
|
||||
@Query("""
|
||||
SELECT f.post.id, COUNT(f.id)
|
||||
FROM Favorite f
|
||||
WHERE f.post.id IN :postIds
|
||||
SELECT f.post.id, COUNT(f.id)\s
|
||||
FROM Favorite f\s
|
||||
WHERE f.post.id IN :postIds\s
|
||||
GROUP BY f.post.id
|
||||
""")
|
||||
\s""")
|
||||
List<Object[]> countLikesByPostIds(List<Long> postIds);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user