From 7570f49581ec4c40530b51777624bfad8d17a5b2 Mon Sep 17 00:00:00 2001 From: Erik Winter Date: Sat, 21 Dec 2024 14:04:28 +0100 Subject: [PATCH] wip --- sync/service/postgres.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync/service/postgres.go b/sync/service/postgres.go index 9f169ff..a4d6599 100644 --- a/sync/service/postgres.go +++ b/sync/service/postgres.go @@ -59,7 +59,7 @@ func NewPostgres(host, port, dbname, user, password string) (*Postgres, error) { } func (p *Postgres) Update(i item.Item, ts time.Time) error { - var recurrerJSON interface{} + var recurrerJSON any if i.Recurrer != nil { var err error recurrerJSON, err = json.Marshal(i.Recurrer) @@ -70,7 +70,7 @@ func (p *Postgres) Update(i item.Item, ts time.Time) error { recurrerJSON = nil } - _, err = p.db.Exec(` + _, err := p.db.Exec(` INSERT INTO items (id, kind, updated, deleted, body, recurrer, recur_next) VALUES ($1, $2, $3, $4, $5, $6, $7) ON CONFLICT (id) DO UPDATE