From f8e9b3902db3a72d626ff3ca0cb1aba695d0da45 Mon Sep 17 00:00:00 2001 From: Kristian Borgwarth <10348902@pm.me> Date: Fri, 3 Apr 2026 23:56:01 +0200 Subject: [PATCH] fix(note_repo): pass ctx --- persistence/repositories/tag_repository.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/persistence/repositories/tag_repository.go b/persistence/repositories/tag_repository.go index 334e846..4710728 100644 --- a/persistence/repositories/tag_repository.go +++ b/persistence/repositories/tag_repository.go @@ -10,7 +10,7 @@ import ( type ITagRepository interface { Upsert(ctx context.Context, tags []*models.Tag) error - UpsertNoteTags(noteID string, tagIDs []string) error + UpsertNoteTags(ctx context.Context, noteID string, tagIDs []string) error } type tagRepository struct { @@ -40,7 +40,7 @@ func (r *tagRepository) Upsert(ctx context.Context, tags []*models.Tag) error { return err } -func (r *tagRepository) UpsertNoteTags(noteID string, tagIDs []string) error { +func (r *tagRepository) UpsertNoteTags(ctx context.Context ,noteID string, tagIDs []string) error { if len(tagIDs) == 0 { return nil } @@ -55,7 +55,7 @@ func (r *tagRepository) UpsertNoteTags(noteID string, tagIDs []string) error { query := "INSERT OR IGNORE INTO note_tags(note_id, tag_id) VALUES " + strings.Join(placeholders, ",") - _, err := r.Transaction.ExecContext(context.Background(), query, args...) + _, err := r.Transaction.ExecContext(ctx, query, args...) if err != nil { return err }