diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-02-28 20:55:01 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-02-28 20:55:01 +0300 |
commit | 4bb60040d5abc2478ffafac5afe308ef7b04cb25 (patch) | |
tree | 3de7b9af5733adf56fd454e3b96e95abd0def707 /internal/client | |
parent | 57f798df3d176f84a977c1bb9200817293441323 (diff) |
Improve API
Diffstat (limited to 'internal/client')
-rw-r--r-- | internal/client/api.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/client/api.go b/internal/client/api.go index 573123e0..cd10283f 100644 --- a/internal/client/api.go +++ b/internal/client/api.go @@ -13,12 +13,13 @@ func RequestDomain(apiUrl, host string) *DomainResponse { resp, err := http.PostForm(apiUrl+"/pages/domain", values) if err != nil { - // Ignore here + // Ignore error, or print it return nil } defer resp.Body.Close() if resp.StatusCode != 200 { + // Ignore responses that are not 200 return nil } @@ -29,5 +30,5 @@ func RequestDomain(apiUrl, host string) *DomainResponse { return nil } - return nil + return &domainResponse } |