Moved some code around and updated the README
This commit is contained in:
parent
368445e3a5
commit
e9f39d25b4
10 changed files with 135 additions and 149 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue