From 5665d56ce423e4bf91ed31b673fa0ce66868c28c Mon Sep 17 00:00:00 2001 From: SoXX Date: Fri, 5 Jul 2024 11:32:17 +0200 Subject: [PATCH] fix: function header Signed-off-by: SoXX --- pkg/database/post.go | 3 +-- pkg/database/postgres.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/database/post.go b/pkg/database/post.go index c30e948..5336c8a 100644 --- a/pkg/database/post.go +++ b/pkg/database/post.go @@ -2,7 +2,6 @@ package database import ( "context" - "gorm.io/gorm" "git.dragse.it/anthrove/otter-space-sdk/v2/pkg/models" ) @@ -13,7 +12,7 @@ type Post interface { CreatePost(ctx context.Context, anthrovePost *models.Post) error // TODO: Everything - CreatePostInBatch(ctx context.Context, db *gorm.DB, anthrovePost []models.Post, batchSize int) error + CreatePostInBatch(ctx context.Context, anthrovePost []models.Post, batchSize int) error // GetPostByAnthroveID retrieves a post by its Anthrove ID. GetPostByAnthroveID(ctx context.Context, anthrovePostID models.AnthrovePostID) (*models.Post, error) diff --git a/pkg/database/postgres.go b/pkg/database/postgres.go index 8931973..039e8e3 100644 --- a/pkg/database/postgres.go +++ b/pkg/database/postgres.go @@ -92,7 +92,7 @@ func (p *postgresqlConnection) CreatePost(ctx context.Context, anthrovePost *mod return postgres.CreatePost(ctx, p.db, anthrovePost) } -func (p *postgresqlConnection) CreatePostInBatch(ctx context.Context, db *gorm.DB, anthrovePost []models.Post, batchSize int) error { +func (p *postgresqlConnection) CreatePostInBatch(ctx context.Context, anthrovePost []models.Post, batchSize int) error { return postgres.CreatePostInBatch(ctx, p.db, anthrovePost, batchSize) }