Add Calendar Events widget, integrate ICS calendar parsing, and refine related UI components
This commit is contained in:
@@ -47,9 +47,17 @@ func FetchNews() News {
|
||||
config.LoadConfig(cfg)
|
||||
client := &http.Client{}
|
||||
|
||||
if cfg.News.ApiKey == "" {
|
||||
return News{
|
||||
Status: "No API key provided",
|
||||
}
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("GET", apiBaseURL+"?sources="+cfg.News.Sources+"&pageSize=100&apiKey="+cfg.News.ApiKey, nil)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
return News{
|
||||
Status: err.Error(),
|
||||
}
|
||||
}
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user