fix/change string to time.Time where possible

This commit is contained in:
diPhantxm
2023-03-12 23:11:00 +03:00
parent ca40ab4559
commit c9a0f83145
5 changed files with 165 additions and 174 deletions

View File

@@ -82,9 +82,9 @@ func (c Client) Request(method string, path string, req, resp interface{}) (*Res
response.Data = resp
response.StatusCode = httpResp.StatusCode
if httpResp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &response)
} else {
err = json.Unmarshal(body, &response.Data)
} else {
err = json.Unmarshal(body, &response)
}
if err != nil {
return nil, err