diff --git a/PROJECTS/advanced/monitor-the-situation-dashboard/backend/internal/collectors/gdelt/client.go b/PROJECTS/advanced/monitor-the-situation-dashboard/backend/internal/collectors/gdelt/client.go index ec2bd0ff..745a3742 100644 --- a/PROJECTS/advanced/monitor-the-situation-dashboard/backend/internal/collectors/gdelt/client.go +++ b/PROJECTS/advanced/monitor-the-situation-dashboard/backend/internal/collectors/gdelt/client.go @@ -68,8 +68,8 @@ type ThemeBucket struct { type rawTimeline struct { Timeline []struct { Data []struct { - Date string `json:"date"` - Value int `json:"value"` + Date string `json:"date"` + Value float64 `json:"value"` } `json:"data"` } `json:"timeline"` } @@ -116,7 +116,7 @@ func (c *Client) FetchTheme(ctx context.Context, theme string) ([]ThemeBucket, e out = append(out, ThemeBucket{ Theme: theme, Time: ts.UTC(), - Count: d.Value, + Count: int(d.Value), }) } return out, nil