From 9a79d176c91de59a409d06efc8837c1d8f38b5c0 Mon Sep 17 00:00:00 2001 From: tsmethurst Date: Tue, 9 Mar 2021 17:03:40 +0100 Subject: moving stuff around, stubbing interfaces --- internal/db/postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/db/postgres.go') diff --git a/internal/db/postgres.go b/internal/db/postgres.go index a66b1364a..568d384e4 100644 --- a/internal/db/postgres.go +++ b/internal/db/postgres.go @@ -114,7 +114,7 @@ func newPostgresService(ctx context.Context, c *config.Config, log *logrus.Entry CreatedAt: time.Now(), UpdatedAt: time.Now(), } - if _, err := conn.Model(note).Returning("id").Insert(); err != nil { + if _, err := conn.WithContext(ctx).Model(note).Returning("id").Insert(); err != nil { cancel() return nil, fmt.Errorf("db insert error: %s", err) } -- cgit v1.2.3