fix: wrong query execution

This commit is contained in:
SoXX 2024-05-30 21:22:58 +02:00
parent 776cd9a32f
commit 22436a1d77

View File

@ -13,7 +13,7 @@ import (
func CreateUserNodeWithSourceRelation(ctx context.Context, driver neo4j.DriverWithContext, anthroveUserID models.AnthroveUserID, sourceDomain string, userID string, username string) error { func CreateUserNodeWithSourceRelation(ctx context.Context, driver neo4j.DriverWithContext, anthroveUserID models.AnthroveUserID, sourceDomain string, userID string, username string) error {
query := ` query := `
MATCH (sourceNode:Source {domain: $source_domain}) MATCH (sourceNode:Source {domain: $source_domain})
MERGE (userNode {user_id: $anthrove_user_id})-[r:HAS_ACCOUNT_AT {username: $source_user_name, user_id: $source_user_id}]->(sourceNode) MERGE (:User {user_id: $anthrove_user_id})-[r:HAS_ACCOUNT_AT {username: $source_user_name, user_id: $source_user_id}]->(sourceNode)
` `
params := map[string]any{ params := map[string]any{
"anthrove_user_id": anthroveUserID, "anthrove_user_id": anthroveUserID,