Moved some code around and updated the README

This commit is contained in:
ChaoticByte 2024-07-22 18:41:22 +02:00
parent 368445e3a5
commit e9f39d25b4
No known key found for this signature in database
10 changed files with 135 additions and 149 deletions

View file

@ -57,9 +57,7 @@ func (e ApiEndpoint) getNotices(since time.Time) ([]WidNotice, time.Time, error)
if err == nil {
if res.StatusCode == 200 {
resBody, err := io.ReadAll(res.Body)
if err != nil {
return []WidNotice{}, since, err
}
if err != nil { return []WidNotice{}, since, err }
var decodedData map[string]interface{}
if err = json.Unmarshal(resBody, &decodedData); err != nil {
return []WidNotice{}, since, err