mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
Code cleanup and missing error checks
This commit is contained in:
parent
6eaef18188
commit
c4193f42a1
7 changed files with 23 additions and 19 deletions
|
@ -79,7 +79,10 @@ func listRequest[T Result](c Client, path string, offset int, limit int) (result
|
|||
"limit": strconv.Itoa(limit),
|
||||
}).
|
||||
SetResult(&result)
|
||||
c.setToken(request)
|
||||
err = c.setToken(request)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
response, err := request.Get(path)
|
||||
|
||||
if response.StatusCode() != 200 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue