From 6828cba26d0bc679b5132c707458a408edd5b712 Mon Sep 17 00:00:00 2001 From: Houssem Nasri Date: Fri, 3 May 2024 14:44:57 +0100 Subject: [PATCH] Fix formatting --- src/main/java/net/askvio/database/VoteRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/askvio/database/VoteRepository.java b/src/main/java/net/askvio/database/VoteRepository.java index 74499b9..3e6e6df 100644 --- a/src/main/java/net/askvio/database/VoteRepository.java +++ b/src/main/java/net/askvio/database/VoteRepository.java @@ -11,7 +11,7 @@ import org.springframework.data.repository.query.Param; public interface VoteRepository extends JpaRepository { - @Query(value = "SELECT IFNULL(SUM(vote_type), 0) FROM vote WHERE post_id= :postId", nativeQuery = true) + @Query(value = "SELECT IFNULL(SUM(vote_type), 0) FROM vote WHERE post_id = :postId", nativeQuery = true) Integer getPostTotalVote(@Param("postId") Long postId); @Query(value = "SELECT COUNT(*) FROM vote WHERE vote_type = 1 AND post_id = :postId", nativeQuery = true)