Removed app kill depending on auth status code (fixes #15)
This commit is contained in:
parent
d72e73ce97
commit
f556b22890
1 changed files with 0 additions and 6 deletions
|
@ -7,7 +7,6 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
@ -119,11 +118,6 @@ 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.StatusOK {
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, cookie := range resp.Cookies() {
|
for _, cookie := range resp.Cookies() {
|
||||||
if cookie.Name == "PHPSESSID" {
|
if cookie.Name == "PHPSESSID" {
|
||||||
sessionID = cookie.Value
|
sessionID = cookie.Value
|
||||||
|
|
Loading…
Reference in a new issue