Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
HoussemNasri authored May 3, 2024
1 parent f0028ed commit 6828cba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/askvio/database/VoteRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.springframework.data.repository.query.Param;

public interface VoteRepository extends JpaRepository<Vote, VoteId> {
@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)
Expand Down

0 comments on commit 6828cba

Please sign in to comment.