fix(monitor/collectors/gdelt): GDELT 'value' field is float64 not int (caught in live verify)

This commit is contained in:
CarterPerez-dev 2026-05-02 04:42:39 -04:00
parent d662a8c81a
commit 2f0c019f20
1 changed files with 3 additions and 3 deletions

View File

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