From f556b22890ae13c18081d164c1719d094f98320f Mon Sep 17 00:00:00 2001 From: Vincent Composieux Date: Wed, 2 Oct 2019 15:17:11 +0200 Subject: [PATCH] Removed app kill depending on auth status code (fixes #15) --- internal/pihole/client.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/internal/pihole/client.go b/internal/pihole/client.go index 5558e2b..25b6de9 100644 --- a/internal/pihole/client.go +++ b/internal/pihole/client.go @@ -7,7 +7,6 @@ import ( "log" "net/http" "net/url" - "os" "strconv" "strings" "time" @@ -119,11 +118,6 @@ func (c *Client) getPHPSessionID() (sessionID string) { 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() { if cookie.Name == "PHPSESSID" { sessionID = cookie.Value