summaryrefslogtreecommitdiff
path: root/internal/db/postgres.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-03-09 17:03:40 +0100
committerLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-03-09 17:03:40 +0100
commit9a79d176c91de59a409d06efc8837c1d8f38b5c0 (patch)
treef4582b8eb2f57cfa356b593420308a462a2811db /internal/db/postgres.go
parentadd note struct (diff)
downloadgotosocial-9a79d176c91de59a409d06efc8837c1d8f38b5c0.tar.xz
moving stuff around, stubbing interfaces
Diffstat (limited to 'internal/db/postgres.go')
-rw-r--r--internal/db/postgres.go2
1 files changed, 1 insertions, 1 deletions
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)
}