🐛 Fixed missing error returns
This commit is contained in:
parent
af1e4b7fa7
commit
08cb7e95ac
|
@ -45,9 +45,7 @@ func GetViews(path string, hour, day, month, year int) (*PageViews, error) {
|
|||
}
|
||||
|
||||
var resp PageViews
|
||||
if err := json.Unmarshal(*body.Result, &resp); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = json.Unmarshal(*body.Result, &resp)
|
||||
|
||||
return &resp, nil
|
||||
return &resp, err
|
||||
}
|
||||
|
|
|
@ -26,5 +26,5 @@ func (account *Account) RevokeAccessToken() (*Account, error) {
|
|||
var resp Account
|
||||
err = json.Unmarshal(*body.Result, &resp)
|
||||
|
||||
return &resp, nil
|
||||
return &resp, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue