Fixed API login response to work properly with PI-Hole v4.3.2
This commit is contained in:
parent
fe091ae1b6
commit
d72e73ce97
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ func (c *Client) getPHPSessionID() (sessionID string) {
|
||||||
log.Printf("An error has occured during login to PI-Hole: %v", err)
|
log.Printf("An error has occured during login to PI-Hole: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if resp.StatusCode != http.StatusFound {
|
if resp.StatusCode != http.StatusOK {
|
||||||
log.Printf("Unable to login to PI-Hole, got a HTTP status code response '%d' instead of '%d'", resp.StatusCode, http.StatusFound)
|
log.Printf("Unable to login to PI-Hole, got a HTTP status code response '%d' instead of '%d'", resp.StatusCode, http.StatusFound)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue