From 5e501b20036f533c5ffcadfff1c1f0e8d0f6dde8 Mon Sep 17 00:00:00 2001 From: soxx Date: Fri, 21 Jun 2024 22:57:05 +0200 Subject: [PATCH] fix(postgres): ** whyy Signed-off-by: soxx --- internal/postgres/post.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/postgres/post.go b/internal/postgres/post.go index cf7a58c..3fc9ec1 100644 --- a/internal/postgres/post.go +++ b/internal/postgres/post.go @@ -40,7 +40,7 @@ func CheckIfAnthrovePostNodeExistsByAnthroveID(ctx context.Context, db *gorm.DB, return executeCheckQuery(ctx, db, "id = ?", string(anthrovePostID)) } -func CheckIfAnthrovePostNodeExistsBySourceURL(ctx context.Context, db *gorm.DB, sourceURL string) (*graphModels.AnthrovePost, bool, error) { +func CheckIfAnthrovePostNodeExistsBySourceURL(ctx context.Context, db *gorm.DB, sourceURL string) (graphModels.AnthrovePost, bool, error) { var post pgModels.Post err := db.WithContext(ctx).Model(&pgModels.Post{}).InnerJoins("References", db.Where("url = ?", sourceURL)).First(&post).Error @@ -51,7 +51,7 @@ func CheckIfAnthrovePostNodeExistsBySourceURL(ctx context.Context, db *gorm.DB, return nil, false, err } - pgPost := &graphModels.AnthrovePost{ + pgPost := graphModels.AnthrovePost{ PostID: models.AnthrovePostID(post.ID), Rating: post.Rating, }