This commit is contained in:
Erik Winter 2024-12-21 14:04:28 +01:00
parent e6c6dabb1b
commit 7570f49581
1 changed files with 2 additions and 2 deletions

View File

@ -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