wip
This commit is contained in:
parent
e6c6dabb1b
commit
7570f49581
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue