From 7fdc5d15c7f85a280ee420d76932dae6dc66535b Mon Sep 17 00:00:00 2001 From: soxx Date: Fri, 16 Feb 2024 23:44:33 +0100 Subject: [PATCH] fix: query to get only distinct favPost --- internal/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/user.go b/internal/user.go index 9ae5729..97faef3 100644 --- a/internal/user.go +++ b/internal/user.go @@ -63,7 +63,7 @@ func GetUserFavoritesCount(ctx context.Context, driver neo4j.DriverWithContext, MATCH (userNode:User {user_id: $anthrove_user_id}) MATCH (userNode)-[:FAV]->(favPost:AnthrovePost) MATCH (sourceNode)-[:REFERENCE]->(favPost) - RETURN count(favPost) AS FavoritePostsCount + RETURN count( DISTINCT favPost) AS FavoritePostsCount ` params := map[string]any{