Skip to content

Commit

Permalink
ref: remove surplus not HTTPOK check
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesKimara committed Oct 17, 2021
1 parent 39ad8fe commit 51940ed
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ipfs.go
Expand Up @@ -131,11 +131,7 @@ func (ip *ipfsClient) Add(ctx context.Context, filePath string) (ipo IPFSObject,
if err != nil {
return
}
ipo = IPFSObject{}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
return ipo, handleAPIErrorResponse(res)
}
if err = json.NewDecoder(res.Body).Decode(&ipo); err != nil {
return
}
Expand Down

0 comments on commit 51940ed

Please sign in to comment.