Unverified Commit d860866b authored by 老广's avatar 老广 Committed by GitHub

Merge pull request #65 from jumpserver/dev

fix user auth bug
parents 37daa828 46f0f142
......@@ -172,7 +172,7 @@ func (c *Client) Do(method, url string, data, res interface{}, params ...map[str
return
}
// Unmarshal response body to result struct
if res != nil && resp.StatusCode >= 200 && resp.StatusCode < 300 {
if res != nil && resp.StatusCode >= 200 && resp.StatusCode <= 300 {
err = json.Unmarshal(body, res)
if err != nil {
msg := fmt.Sprintf("%s %s failed, unmarshal '%s' response failed: %s", req.Method, req.URL, body[:12], err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment