fix: removed unneeded argument

This commit is contained in:
SoXX 2024-02-16 15:56:53 +01:00
parent c4b2eee03b
commit 17631b1815
2 changed files with 3 additions and 4 deletions

View File

@ -4,7 +4,6 @@ import (
"context" "context"
"git.dragse.it/anthrove/anthrove-graph-sdk.git/pkg/models" "git.dragse.it/anthrove/anthrove-graph-sdk.git/pkg/models"
"github.com/neo4j/neo4j-go-driver/v5/neo4j"
) )
type Graph interface { type Graph interface {
@ -12,7 +11,7 @@ type Graph interface {
Connect(ctx context.Context, endpoint string, username string, password string) error Connect(ctx context.Context, endpoint string, username string, password string) error
// AddUserToGraph uploads an Anthrove user to the graph // AddUserToGraph uploads an Anthrove user to the graph
AddUserToGraph(ctx context.Context, driver neo4j.DriverWithContext, anthroveUserID models.AnthroveUserID, sourceDomain string, userID string, username string) (*models.AnthroveUser, error) AddUserToGraph(ctx context.Context, anthroveUserID models.AnthroveUserID, sourceDomain string, userID string, username string) (*models.AnthroveUser, error)
// AddSourceToGraph uploads an Anthrove source to the graph // AddSourceToGraph uploads an Anthrove source to the graph
AddSourceToGraph(ctx context.Context, anthroveSource *models.AnthroveSource) error AddSourceToGraph(ctx context.Context, anthroveSource *models.AnthroveSource) error

View File

@ -36,8 +36,8 @@ func (g *graphConnection) Connect(ctx context.Context, endpoint string, username
return nil return nil
} }
func (g *graphConnection) AddUserToGraph(ctx context.Context, driver neo4j.DriverWithContext, anthroveUserID models.AnthroveUserID, sourceDomain string, userID string, username string) (*models.AnthroveUser, error) { func (g *graphConnection) AddUserToGraph(ctx context.Context, anthroveUserID models.AnthroveUserID, sourceDomain string, userID string, username string) (*models.AnthroveUser, error) {
return internal.CreateUserNodeWithSourceRelation(ctx, driver, anthroveUserID, sourceDomain, userID, username) return internal.CreateUserNodeWithSourceRelation(ctx, g.driver, anthroveUserID, sourceDomain, userID, username)
} }
func (g *graphConnection) AddSourceToGraph(ctx context.Context, anthroveSource *models.AnthroveSource) error { func (g *graphConnection) AddSourceToGraph(ctx context.Context, anthroveSource *models.AnthroveSource) error {