bugfix
This commit is contained in:
@@ -4,8 +4,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
)
|
||||
|
||||
type InsertWS90Params struct {
|
||||
@@ -38,8 +36,7 @@ type InsertWS90Params struct {
|
||||
func (d *DB) InsertWS90(ctx context.Context, p InsertWS90Params) error {
|
||||
b, _ := json.Marshal(p.Payload)
|
||||
|
||||
var payloadJSON pgtype.JSONB
|
||||
_ = payloadJSON.Set(b)
|
||||
payloadJSON := json.RawMessage(b)
|
||||
|
||||
_, err := d.Pool.Exec(ctx, `
|
||||
INSERT INTO observations_ws90 (
|
||||
@@ -90,8 +87,7 @@ type InsertOpenMeteoHourlyParams struct {
|
||||
func (d *DB) UpsertOpenMeteoHourly(ctx context.Context, p InsertOpenMeteoHourlyParams) error {
|
||||
b, _ := json.Marshal(p.SourcePayload)
|
||||
|
||||
var sourceJSON pgtype.JSONB
|
||||
_ = sourceJSON.Set(b)
|
||||
sourceJSON := json.RawMessage(b)
|
||||
|
||||
_, err := d.Pool.Exec(ctx, `
|
||||
INSERT INTO forecast_openmeteo_hourly (
|
||||
|
||||
Reference in New Issue
Block a user